Vscroll on Tpanel

Post Reply
User avatar
MdaSolution
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Vscroll on Tpanel

Post by MdaSolution »

Can we insert a vertical scroll to Tpanel ?
FWH .. BC582.. xharbour
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Vscroll on Tpanel

Post by nageswaragunupudi »

yes
Regards

G. N. Rao.
Hyderabad, India
User avatar
MdaSolution
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Vscroll on Tpanel

Post by MdaSolution »

Can have a sample please ?
because on Tpanel class I not see vscroll method
I have fwh 9.10
FWH .. BC582.. xharbour
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Vscroll on Tpanel

Post by nageswaragunupudi »

please try

Code: Select all

oPanel:nStyle := nOr( oPanel:nStyle, WS_VSCROLL )
DEFINE SCROLLBAR oPanel:oVScroll VERTICAL OF oPanel RANGE 0,100
Regards

G. N. Rao.
Hyderabad, India
User avatar
MdaSolution
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Vscroll on Tpanel

Post by MdaSolution »

Mr Rao Nages

NOT RUN OK
PLEASE TRY THIS
I use a bitmap with 800 of width

Code: Select all

#include "fivewin.ch"

static  oTest

Function Main()

LOCAL oWnd, oBar, oPanel

 DEFINE WINDOW oWnd ;
      FROM 0, 0 TO 600, 800 PIXEL;
      TITLE "test" ;
      MDI

 DEFINE BUTTONBAR oBar 3D SIZE 64, 64 OF  oWnd   2007

    DEFINE BUTTON OF oBar  action   write_bmp(oPanel,oBar:nHeight-1,5,"test.bmp")        // first  click here
    DEFINE BUTTON OF oBar  action   write_bmp(oPanel,oTest:nBOTTOM+5,5,"test.bmp")   // second    click here


oPanel := TPanel(): New( oBar:nHeight-1 , 0, 400, 500, oWnd )

oPanel:nStyle := nOr( oPanel:nStyle, WS_VSCROLL )

DEFINE SCROLLBAR oPanel:oVScroll VERTICAL OF oPanel RANGE 0,100



 ACTIVATE WINDOW oWnd    maximized




      RETURN  NIL


Function  write_bmp(oPanel,ntop,nleft,cBmpfile)

      @ ntop,nleft BITMAP oTest FILENAME  cBmpfile   OF  oPanel  BORDER

    RETURN  NIL
FWH .. BC582.. xharbour
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Vscroll on Tpanel

Post by Antonio Linares »

Mda,

You are using a MDI window which uses an "invisible" container window and you can not create controls on top of it.

If you modify your example this way, then you can check that Rao advise was right and also it may be closer to what you are looking for (?):

Code: Select all

#include "FiveWin.ch"

static  oTest

Function Main()

LOCAL oWnd, oBar, oPanel

   DEFINE WINDOW oWnd ;
      FROM 0, 0 TO 600, 800 PIXEL;
      TITLE "test"

   DEFINE BUTTONBAR oBar 3D SIZE 64, 64 OF  oWnd   2007

   DEFINE BUTTON OF oBar ACTION write_bmp( oPanel, 5, 5, "test.bmp" )  // first click here
   DEFINE BUTTON OF oBar ACTION write_bmp( oPanel, oTest:nBOTTOM + 5, 5, "test.bmp" ) // second click here

   oPanel := TPanel(): New( oBar:nHeight - 1 , 0, 400, 500, oWnd )

   oPanel:nStyle := nOr( oPanel:nStyle, WS_VSCROLL )

   DEFINE SCROLLBAR oPanel:oVScroll VERTICAL OF oPanel RANGE 0,100

   oWnd:oClient = oPanel

   ACTIVATE WINDOW oWnd MAXIMIZED

RETURN NIL

Function write_bmp( oPanel, ntop, nleft, cBmpfile )

   @ ntop, nleft BITMAP oTest FILENAME cBmpfile OF oPanel BORDER PIXEL

RETURN NIL
 
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
MdaSolution
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Vscroll on Tpanel

Post by MdaSolution »

ahora funciona
gracias Maestro Antonio

Necesito una lista de todos los registros con la clase de Tsection ( http://forums.fivetechsupport.com/viewt ... =3&t=17804)
FWH .. BC582.. xharbour
Post Reply