Added Brush and Skinbutton-support.
Started to change Buttonstyle from Button to ButtonBMP.
Added Button < File-selection >, to fill a Field with Fileinfo ( Path and Filename ) :
All brushes in Realtime-preview. Only changing Skins, will restart.
You can test it, maybe it is useful.
The new Functions You will find at the Prg-bottom.
The Start is marked with 3 Lines.
Some more changes are needed : have a look at the Prg-top and < Activate Dialog >
static oWndMain, oMruDBFs, aSearches := {}
static nSkinSet := 0, nBack1 := 1, nBack2 := 1, nGposW := 1, nGposD := 1
static nGDirectW := 1, nGDirectD := 1, cDefRdd := "DBFCDX"
function Main( cDbfName )
local oBar, oBmpTiled
SET DATE FORMAT TO "DD/MM/YYYY"
SET _3DLOOK ON
SetBalloon( .T. )
// not needed
// SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
IF nSkinSet > 0
SET_SKIN( nSkinSet )
ENDIF
// Changed, to solve NUMERIC Error !!!
// Restart fom inside the Prog., uses a numeric-value, as well I don't want to load a DBF
// used RESTART.exe from Daniel to start with a new Button-skin
if ! Empty( cDbfName ) .and. TYPE( cDbfName ) <> "N"
Open( cDbfName )
endif
Dialog-changes :
DEFINE DIALOG oDlg TITLE Alias() + " fields" SIZE 400, 400
TRANSPARENT
// The Value 27 means : NO Brushes selected
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( IIF( nBack2 < 27, SET_BRUSH(oDlg, nBack2, nGPosD, nGDirectD), NIL ), ;
Double-function for Gradients : can be used as Button-Skin and Background
Download :
http://www.pflegeplus.com/fw_downloads/dbubrush1.zip
Moved to Section < Preferences >
Some changes in :
For Fileselection, have a look at the PRG.
Changes in function < view >
The shortest File would be something like < D:\A.bmp > 8 Chars, all others are blocked.
Code: Select all
function View( oBrw, oWnd )
local cAlias := Alias()
//local cFileName := oBrw:aRow[ 2 ]
//local cExt := Lower( cFileExt( cFileName ) )
IF ( Alias() )->( FIELDTYPE( oBrw:nArrayAt ) ) = "C" .and. ;
LEN( ( cAlias )->( Fieldget( oBrw:nArrayAt ) ) ) > 7
cFileName := ALLTRIM(oBrw:aRow[ 2 ])
cExt := Lower( cFileExt( cFileName ) )
IF !EMPTY( cExt )
do case
case cExt == "bmp"
WinExec( "mspaint" + " " + cFileName )
case cExt == "txt"
WinExec( "notepad" + " " + cFileName )
otherwise
ShellExecute( oWnd:hWnd, "Open", cFileName )
endcase
ENDIF
ELSE
MsgAlert( "No valid File to load for Preview !", "File-Error")
ENDIF
return nil
Best Regards
Uwe