FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Vscroll on Tpanel
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Vscroll on Tpanel
Posted: Thu Jan 21, 2010 11:00 PM

Can we insert a vertical scroll to Tpanel ?

FWH .. BC582.. xharbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Vscroll on Tpanel
Posted: Fri Jan 22, 2010 01:58 AM

yes

Regards



G. N. Rao.

Hyderabad, India
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Vscroll on Tpanel
Posted: Fri Jan 22, 2010 07:20 AM

Can have a sample please ?
because on Tpanel class I not see vscroll method
I have fwh 9.10

FWH .. BC582.. xharbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Vscroll on Tpanel
Posted: Fri Jan 22, 2010 02:23 PM
please try
Code (fw): Select all Collapse
oPanel:nStyle := nOr( oPanel:nStyle, WS_VSCROLL )
DEFINE SCROLLBAR oPanel:oVScroll VERTICAL OF oPanel RANGE 0,100
Regards



G. N. Rao.

Hyderabad, India
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Vscroll on Tpanel
Posted: Fri Jan 22, 2010 03:42 PM
Mr Rao Nages

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


Code (fw): Select all Collapse
#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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Vscroll on Tpanel
Posted: Fri Jan 22, 2010 08:04 PM
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 (fw): Select all Collapse
#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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: Vscroll on Tpanel
Posted: Fri Jan 22, 2010 08:30 PM

ahora funciona
gracias Maestro Antonio

Necesito una lista de todos los registros con la clase de Tsection ( viewtopic.php?f=3&t=17804)

FWH .. BC582.. xharbour

Continue the discussion