FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Panelscroll
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Panelscroll
Posted: Wed May 09, 2018 11:57 AM
It is possible use a panelscroll to scroll bntmp buttons ?
a small sample please thanks


I tried but it make error

oScroll:= TScrollPanel():New( 10, 10, 90, oFld:nwidth-50, oFld:aDialogs[1], .f. )



activte dialog odlg;
on init BuildServizi(oScroll)


Function BuildServizi(oScroll)
Local nRow:= 10
Local nCol:= 10
Local oBtn:=array(10)

For n=1 to 10

@ nRow,ncol BTNBMP oBtn[n] ;
FILENAME ".\bitmaps\Lettino.bmp" ;
SIZE 170, 60 PIXEL;
ACTION NIL FLAT ;
PROMPT "Lettino"+CRLF+ "5.00" LEFT;
OF oScroll ;
TOOLTIP "fai click per aggiungere un servizio" ;
COLOR CLR_RED,CLR_WHITE
ncol+=175
IF n=5
nRow+=65
nCol:=10
endif


Next

return nil








when I click on vertical scroll make this error

Error
Code (fw): Select all Collapse
 Error description: Error BASE/1004  No exported method: NTOP
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => NTOP( 0 )
   Called from: .\source\classes\SCRLPANL.PRG => TSCROLLPANEL:GODOWN( 257 )
   Called from: .\source\classes\SCRLPANL.PRG => (b)TSCROLLPANEL( 88 )
   Called from: .\source\classes\SCRLPANL.PRG => TSCROLLPANEL:MOUSEMOVE( 0 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\CONTROL.PRG => TSCROLLPANEL:HANDLEEVENT( 1731 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3356 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: test.prg => SHOWINVOICE( 248 )
   Called from: test.prg => MAIN( 24 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Panelscroll
Posted: Thu May 10, 2018 05:47 AM

any solution ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Panelscroll
Posted: Thu May 10, 2018 09:49 AM
Try with this

Code (fw): Select all Collapse
#include "fivewin.ch"

Function Main()

Local oPanel,oBrush,oWnd

   //DEFINE BRUSH oBrush FILENAME "..\bitmaps\backgrnd\clouds.bmp"
   DEFINE DIALOG oWnd SIZE 800, 600 PIXEL


   ACTIVATE DIALOG oWnd CENTERED ON INIT ( oPanel := CreaPnel( oWnd, oBrush ), oPanel:SetRange() )
   //RELEASE BRUSH oBrush

Return nil
 
Function CreaPnel( oWnd, oBrush )

Local oPanel
local n
Local nRow:= 10
Local nCol:= 10
Local oBtn:=array(12)

   oPanel:= TScrollPanel():New(40,2,178,570,oWnd, .t.)

For n=1 to 12

@ nRow, ncol BTNBMP oBtn[n] ;
FILENAME "..\bitmaps\newitem.bmp" ;
SIZE 170, 60 PIXEL ;
ACTION NIL FLAT ;
PROMPT "Lettino"+CRLF+ "5.00" LEFT;
OF oPanel ;
TOOLTIP "fai click per aggiungere un servizio" ;
COLOR CLR_RED,CLR_WHITE
ncol+=175
IF n=3 .or. n=6 .or. n=9
nRow+=65
nCol:=10
endif

Next

Return oPanel
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Panelscroll
Posted: Thu May 10, 2018 11:36 AM

Now run ok
THANKS
I can use this also for my bus application

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion