// Testing FiveWin own folders controls support
#include "FiveWin.ch"
#include "Folder.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFld, oCbx, oSay
local nValue := 2, oChk, lChk := .t.
local cItem, oImageList
SET _3DLOOK ON
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE FOLDER oFld ID 110 OF oDlg ;
PROMPT "Cli&pper", "&and", "&Windows", "&Magic" ;
DIALOGS "Sub1", "Sub2"
oFld:aEnable = { .t., .t., .f., .f. }
REDEFINE COMBOBOX oCbx VAR cItem ITEMS { "This", "is", "a test" } ;
ID 100 OF oFld:aDialogs[ 1 ]
REDEFINE CHECKBOX oChk VAR lChk ID 92 OF oFld:aDialogs[ 1 ] ON CHANGE MsgBeep()
REDEFINE SAY oSay ID 10 OF oFld:aDialogs[ 1 ] PROMPT "Test" COLOR "R+/B"
REDEFINE BUTTON ID 110 OF oFld:aDialogs[ 1 ] ; // Redefining a child
ACTION oChk:SetText( Time() )
REDEFINE BUTTON ID 120 OF oFld:aDialogs[ 1 ] ;
ACTION DoBrowse()
REDEFINE BITMAP ID 130 OF oFld:aDialogs[ 1 ] ;
FILE "..\bitmaps\question.bmp" TRANSPARENT
REDEFINE RADIO nValue ID 110, 120, 130 OF oFld:aDialogs[ 2 ] ;
ON CHANGE Test(nValue) // MsgBeep()
REDEFINE BUTTON ID 104 OF oFld:aDialogs[ 2 ] ; // Redefining a child
ACTION oFld:SetPrompts( { "one", "two", "three", "four" } )
REDEFINE BUTTON ID 120 OF oDlg ;
ACTION oDlg:End()
oFld:aDialogs[ 1 ]:bRClicked = { || MsgInfo( "page 1" ) }
oFld:aDialogs[ 2 ]:bRClicked = { || MsgInfo( "page 2" ) }
ACTIVATE DIALOG oDlg CENTERED ;
VALID MsgYesNo( "Want to end ?" ) ;
ON INIT SetImages( oDlg, oFld )
return nil
//----------------------------------------------------------------------------//
function DoBrowse()
USE Customer
Browse()
USE
return nil
//----------------------------------------------------------------------------//
function SetImages( oDlg, oFld )
local oImageList
DEFINE IMAGELIST oImageList SIZE 16, 16
oImageList:AddMasked( TBitmap():Define( "new",, oDlg ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "open",, oDlg ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "search",, oDlg ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "print",, oDlg ), nRGB( 192, 192, 192 ) )
oFld:SetImageList( oImageList )
return nil
//----------------------------------------------------------------------------//
procedure AppSys // Xbase++ requirement
return
//----------------------------------------------------------------------------//
Function Test(nValue)
? nValue
Return nil