Panelscroll

Panelscroll

Postby Silvio.Falconi » 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


Image





when I click on vertical scroll make this error

Error
Code: Select all  Expand view  RUN
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: Panelscroll

Postby Silvio.Falconi » Thu May 10, 2018 5:47 am

any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: Panelscroll

Postby cnavarro » Thu May 10, 2018 9:49 am

Try with this

Code: Select all  Expand view  RUN

#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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Panelscroll

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests