#Include "Fivewin.ch"
#include "constant.ch"
#include "ttitle.ch"
STATIC oFont
Function Main()
Local oFrmInvoice
Local oWnd, oFld, oBtn1, oBtn2
Local nBottom := 35
Local nRight := 110
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
Local oFont, oBrush1, oBrush2, oBrush3
Local c_path, c_path1, aBitmaps, oDGet1, oDGet2, oDGet3, cTest1 := SPACE(20), cTest2 := SPACE(20)
c_path := cFilePath(GetModuleFileName( GetInstance() ) )
c_path1 := c_path + "SYSTEM\"
aBitmaps := { c_path1 + "Preview.Bmp",;
c_path1 + "Preview.bmp",;
c_path1 + "Exit1.bmp" }
oFont := TFont():New("Arial",,-14,.F.,.T. ,,,,.F. )
DEFINE BRUSH oBrush1 GRADIENT { { 0.50, 16710607, 16759929 }, { 0.50, 16759929, 16710607 } }
DEFINE BRUSH oBrush2 GRADIENT { { 1, 16710607, 16759929 } }
DEFINE BRUSH oBrush3 GRADIENT { { 1, 16759929, 16710607 } }
oFont := TFont():New("Arial",,-14,.F.,.F. ,,,,.F. )
DEFINE WINDOW oWnd TITLE "Foldertest FWH-version => " + FWVERSION BRUSH oBrush1
DEFINE DIALOG oFrmInvoice TITLE "Test folder" SIZE nWidth, nHeight PIXEL OF oWnd BRUSH oBrush2
@ 15, 10 FOLDEREX SIZE 180, 160 oFld PIXEL ROUND 5 UPDATE ;
PROMPT "Page &1", "Page &2", "&EXIT" OF oFrmInvoice ;
BITMAPS aBitmaps;
ON PAINT TAB PaintTab( Self, nOption );
ON CHANGE ( nSavePage := oFld:nOption, ;
IF( nOption == 3, If( MsgYesNo( "Do you want exit??" ), ;
oWnd:End(), ( ::SetOption( nOldOption ), ::Refresh() ) ), ) ) ;
ON PAINT TEXT( If( nOption == ::nOption .and. nOption == 2, 8388608, 0 ) );
TOP OPTION 1 ALIGN 0, 0, 0
oFld:lTransparent := .T.
oFld:nFolderHeight := 40
oFld:nSeparator := 2
oFld:bClrText := {| o, n | 128 }
oFld:oFont := oFont
oFld:nOption := 1
oFld:aDialogs[ 1 ]:SetBrush( oBrush1 )
oFld:aDialogs[ 2 ]:SetBrush( oBrush2 )
oFld:aDialogs[ 3 ]:SetBrush( oBrush3 )
@ 20,0 Button oBtn1 PROMPT "Edit Value" SIZE 80,10 OF oFld:adialogs[1] PIXEL ;
Action SHOW_MSG(oFld, c_Path1)
@ 50,55 GET oDGet1 var cTest1 SIZE 80,10 PIXEL OF oFld:adialogs[1]
@ 65,55 GET oDGet2 var cTest2 SIZE 80,10 PIXEL OF oFld:adialogs[1]
ACTIVATE DIALOG oFrmInvoice NOWAIT CENTER ;
ON INIT oFrmInvoice:Move( oWnd:nBottom - 150, oWnd:nRight - 120, 400, 420, .f. )
ACTIVATE WINDOW oWnd MAXIMIZED
RELEASE BRUSH oBrush1, oBrush2, oBrush3, oFont
RETURN NIL
// ------------------------
FUNCTION SHOW_MSG(oFld, c_Path1)
LOCAL oTitle, oBtn, oGet, cTest := SPACE(20), oText, oImg
@ 180, 100 TITLE oTitle SIZE 180, 70 OF oFld:adialogs[1] ; // Width, Height
BORDER SHADOW BOTTOMRIGHT SHADOWSIZE 10 PIXEL
oTitle:aGrdBack := { { 0.1, 16443068, 10899511 },{ 0.1, 10899511, 16443068 } }
oTitle:lRound := .T.
@ 10, 20 TITLETEXT oText OF oTitle TEXT "Select : " FONT oFont ;
COLOR 11075583
@ 30, 20 GET oGet var cTest SIZE 120, 20 PIXEL OF oTitle
@ 30, 140 TITLEIMG OF oTitle BITMAP c_Path1 + "Exit1.bmp" SIZE 24, 24 ANIMA ;
ACTION oTitle:End()
RETURN NIL
// ------------------------
FUNCTION PaintTab( o, nOption )
IF nOption == o:nOver .OR. nOption == o:nOption
o:SetAlphaLevel( nOption, 255 )
ELSE
o:SetAlphaLevel( nOption, 50 )
ENDIF
RETURN o:SetFldColors( o, nOption )