#include "FiveWin.ch"
function main()
local oWnd, i, oBrush2
local oFld
DEFINE BRUSH oBrush2 FILE "..\bitmaps\backgrnd\metal.bmp"
DEFINE WINDOW oWnd TITLE "TFolderex - Testing -"
@ 3, 3 FOLDEREX oFld PIXEL ADJUST;
PROMPT "&Social", "&OS", "&Games", "&Movies", "&Email", "Mo&nths", "Se&tting", "E&xit";
ON PAINT TAB PaintTab( Self, nOption );
ON CHANGE ( If( nOption == 8, If( MsgYesNo( "Do you want exit??" ), ;
oWnd:End(), ( ::SetOption( nOldOption ), ::Refresh() ) ), ) );
ON PAINT TEXT( If( nOption == ::nOption .and. nOption == 2, CLR_BLUE, CLR_BLACK ) );
TOP OPTION 2 ALIGN 2, 2, 2
@ 5, 140 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\bartop.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 1 ) )
@ 105, 140 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\barDown.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 3 ) )
@ 55, 80 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\barleft.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 2 ) )
@ 55, 200 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\barright.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 4 ) )
oFld:aDialogs[ 2 ]:SetBrush( oBrush2 )
ACTIVATE WINDOW oWnd;
ON INIT oFld:Resize()
RETURN NIL
FUNCTION PaintTab( o, nOption )
LOCAL hBrush, hBmp, nLastRow
IF nOption == o:nOver .OR. nOption == o:nOption
o:SetAlphaLevel( nOption, 255 )
ELSE
o:SetAlphaLevel( nOption, 50 )
ENDIF
IF nOption == o:nOption .and. nOption == 2
hBmp = ReadBitmap( 0, "..\bitmaps\backgrnd\metal.bmp" )
hBrush = CreatePatternBrush( hBmp )
DeleteObject( hBmp )
IF o:nLayOut == 2
nLastRow = o:aPos[ o:aLines[ o:aOrder[ 1 ] ][ 1 ] ][ 1 ] + o:nFolderHeight
SetBrushOrgEx( o:hDC, nLastRow + 2, 1 )
ELSE
SetBrushOrgEx( o:hDC, 2, 2 )
ENDIF
RETURN hBrush
ENDIF
RETURN o:SetFldColors( o, nOption )
sambomb wrote:Could you implement a "close button" like the folders on chrome/firefox/etc... ?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 81 guests