#include "FiveWin.ch"
#include "Constant.ch"
#include "ttitle.ch"
Function Test()
local oDlg,oFont,oBold
local oBar
local oTitle,oFontTitle,oBoldTitle
local aBtnBar[2]
local nRow:= 0,nCol:= 10
local nInterlinea := 30
local nBottom:= 41
local nRight := 94.6
local nHt := nBottom * DLG_CHARPIX_H
local nWd := Max( nRight * DLG_CHARPIX_W, 180 )
oFont := TFont():New( "TAHOMA", 0, 18,, )
oBold := TFont():New( "TAHOMA", 0, 14,,.t. )
oFontTitle := TFont():New( "TAHOMA", 0, 18,, )
oBoldTitle := TFont():New( "TAHOMA", 0, 18,,.t. )
DEFINE DIALOG oDlg SIZE nWd , nHt PIXEL TRUEPIXEL;
FONT oFont TITLE "Configurazione" COLOR CLR_BLACK, RGB( 245,245,235) TRANSPARENT;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX)
//-----------------------------------title
@ nRow, 0 TITLE oTitle OF oDlg SIZE 1025, 65 NOBORDER //PIXEL
oTitle:aGrdBack := { { 0.5, Rgb(250,250,245), Rgb(250,250,245) } }
oTitle:nShadow := 0
nRow+=2
@ nRow, nCol TITLEIMG OF oTitle RESNAME "C:\work\fwh\bitmaps\pngs\home.png" SIZE 48, 48 REFLEX TRANSPARENT
nRow+=14
@ nRow, 75 TITLETEXT OF oTitle TEXT "Big Title" FONT oBoldTitle
nRow+=20
@ nRow, 75 TITLETEXT OF oTitle TEXT "Sub Title " FONT oFonttitle
//------------------------------------------------
DEFINE BUTTONBAR oBar OF oDlg SIZE 92,82 BOTTOM NOBORDER 2015
oBar:bClrGrad := { | lPressed | If( ! lPressed,;
{ { 1, RGB( 250,250,245), RGB( 250,250,245)} },;
{ { 1, RGB( 245,245,235), RGB( 245,245,235)} } ) }
DEFINE BUTTON aBtnBar[1] OF oBar PROMPT "Aiuto" RESOURCE "HLP_DLG" ;
ACTION NIL
DEFINE BUTTON aBtnBar[2] OF oBar PROMPT "Chiudi" RESOURCE "DLG_NO" ;
ACTION NIL BTNRIGHT
ACTIVATE DIALOG oDlg CENTER ;
ON INIT (oDlg:resize(),ChangeButtons( oBar ),;
Config_Form(oFont,oBold,oDlg))
return nil
//----------------------------------------------------------------------//
Function Config_Form(oFont,oBold,oDlg)
local aDat[ 1]
local l01:=.t.
@ 150,8 CHECKBOX aDat[ 1] VAR l01 Prompt "testesttestesttestesttestesttestest" SIZE 120, 11 PIXEL OF oDlg ;
COLOR nRgb(233,229,206), nRgb(218,214,179) FONT oBold
return nil
function ChangeButtons( oBar )
AEval( oBar:aControls, { | oCtrl | oCtrl:nTop += 4, oCtrl:nHeight -= 4 } )
return .T.