Page 1 of 1
scroll dialod , tab and buttons
Posted: Thu Aug 21, 2008 7:43 pm
by Silvio
Dear Anotnio,
I saw your scroll sample
I 'd like create this dialog with 4 folder or tab
1- 50, 51-100, 101-150, 151-200
on each folder I'd like to insert a oPanel scroll
where I can insert 50 buttons on each panel
It 's possible ?
Posted: Fri Aug 22, 2008 7:17 am
by Antonio Linares
Silvio,
Please try it yourself, thanks
It should work, but we will not be sure about it until we try it.
Posted: Fri Aug 22, 2008 1:39 pm
by Silvio
I try it but not run ok
Code: Select all
#include "FWCE.ch"
// test with folder , panel and button
function Main()
local oWnd, cValue, cText := "Hello world!", oFld, i
Local abtn[120]
Local oPanel[6]
DEFINE WINDOW oWnd TITLE "Tables"
// USE ( CurDir() + "\tavoli" )
@ 0.5, 1 FOLDER oFld PROMPTS "1-20", "21-40", "41-60","61-80","81-100","101-120" ;
SIZE 225, 245
@ 0.6, 1.5 PANEL oPanel[1] OF oFld:aDialogs[ 1 ] ;
SIZE oFld:nWidth()-5 , oFld:nHeight() - 20 PIXEL
FOR i = 1 TO 20
CREAPULSANTI( aBtn, i ,oPanel[1])
NEXT
@ 0.6, 1.5 PANEL oPanel[2] OF oFld:aDialogs[ 2 ] ;
SIZE oFld:nWidth()-5 , oFld:nHeight() - 20 PIXEL
FOR i = 21 TO 40
CREAPULSANTI( aBtn, i ,oPanel[2])
NEXT
@ 0.6, 1.5 PANEL oPanel[3] OF oFld:aDialogs[ 3 ] ;
SIZE oFld:nWidth()-5 , oFld:nHeight() - 20 PIXEL
FOR i = 41 TO 60
CREAPULSANTI( aBtn, i ,oPanel[3])
NEXT
@ 0.6, 1.5 PANEL oPanel[4] OF oFld:aDialogs[ 4 ] ;
SIZE oFld:nWidth()-5 , oFld:nHeight() - 20 PIXEL
FOR i = 61 TO 80
CREAPULSANTI( aBtn, i ,oPanel[4])
NEXT
@ 0.6, 1.5 PANEL oPanel[5] OF oFld:aDialogs[ 5 ] ;
SIZE oFld:nWidth()-5 , oFld:nHeight() - 20 PIXEL
FOR i = 81 TO 100
CREAPULSANTI( aBtn, i ,oPanel[5])
NEXT
@ 0.6, 1.5 PANEL oPanel[6] OF oFld:aDialogs[6] ;
SIZE oFld:nWidth()-5 , oFld:nHeight() - 20 PIXEL
FOR i = 101 TO 120
CREAPULSANTI( aBtn, i ,oPanel[6])
NEXT
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------
STATIC FUNCTION CREAPULSANTI( aBtn, nBtn,odlgscroll )
@ 0.5 + ( nBtn - 1 ) * 40, 12 BUTTON abtn[nBtn] PROMPT "TAV." + STR( nBtn, 2 );
PIXEL of odlgscroll SIZE 40,40
*abtn[nBtn]:bAction := {|| menupopup( aBtn[nBtn ] ) }
*abtn[nBtn]:cToolTip :="TAVOLO" + STR( nBtn, 2 )
RETURN NIL
I see only the first 20 tables
I wish in each folder 20 tables 4 for col for 5 row ( 4x5)