FUNCTION TEST_FOLD()
LOCAL oFolder, oSay, oRad, nValue := 1
DEFINE BRUSH oBrush
DEFINE IMAGE oImage1 FILENAME c_path + "\System\Stone.bmp"
DEFINE IMAGE oImage2 FILENAME c_path + "\System\Xp.jpg"
DEFINE DIALOG oDlg TITLE "FiveWin Transparent Folder-Tabs" ;
TRANSPARENT FROM 5, 5 TO 20, 50 BRUSH oBrush
@ 0.5, 1 FOLDER oFolder PROMPT "&xBase", "&And OOP", "&Power" ;
OF oDlg SIZE 160, 90
@ 1, 1 BUTTON "&Exit" OF oFolder:aDialogs[ 1 ] ;
ACTION ( oDlg:End() )
@ 3, 1 SAY oSay PROMPT "Transparent Say" OF oFolder:aDialogs[ 1 ]
@ 1, 10 RADIO oRad VAR nValue OF oFolder:aDialogs[ 1 ] ;
ITEMS "Transparent &1", "Transparent &2", "Transparent &3" _3D SIZE 150, 15 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
@ 3, 1 SAY oSay PROMPT "Transparent Say" OF oFolder:aDialogs[ 2 ]
@ 1, 10 RADIO oRad VAR nValue OF oFolder:aDialogs[ 2 ] ;
ITEMS "Transparent &1", "Transparent &2", "Transparent &3" _3D SIZE 150, 15 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
@ 1, 15 SAY oSay PROMPT "Transparent Say" OF oFolder:aDialogs[ 3 ]
@ 1, 1 RADIO oRad VAR nValue OF oFolder:aDialogs[ 3 ] ;
ITEMS "Transparent &1", "Transparent &2", "Transparent &3" _3D SIZE 150, 15 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
ACTIVATE DIALOG oDlg CENTERED ;
ON PAINT ( Gradient(oDlg:hDc,{0,0,oDlg:nHeight, oDlg:nWidth}, ;
nRgb(253,242,217), nRgb(245,204,107),.T.), ;
FoldBack( oFolder, oImage1, oImage2 ) )
oImage1:End()
oImage2:End()
RETURN nil
// --------------------------------------------
FUNCTION FoldBack( oFld, oImage1, oImage2 )
oFld:aDialogs[ 1 ]:bPainted = { | hDC | GradientFill( hDC, 0, 0, oFld:aDialogs[ 1 ]:nHeight, ;
oFld:aDialogs[ 1 ]:nWidth, { { 0.50, 14853684, 16314573 }, ;
{ 0.50, 16314573, 14853684 } }, .T. ) }
*oFld:aDialogs[ 2 ]:bPainted = { | hDC | oFld:aDialogs[ 2 ]:SetBrush( oBrush1 ) }
oFld:aDialogs[ 2 ]:bPainted = { | hDC | PalBmpDraw( hDC, 0, 0, oImage1:hBitmap, , ;
oFld:aDialogs[ 2 ]:nWidth, oFld:aDialogs[ 2 ]:nHeight, , .T. ) }
oFld:aDialogs[ 3 ]:bPainted = { | hDC | PalBmpDraw( hDC, 0, 0, oImage2:hBitmap, , ;
oFld:aDialogs[ 3 ]:nWidth, oFld:aDialogs[ 3 ]:nHeight, , .T. ) }
RETURN NIL