#include 'fivewin.ch'
#include 'xbrowse.ch'
FUNCTION MAIN()
local oDlg, oBrw, oFont
local aRowGrad, aSelGrad, aStdGrad
local n := RGB( 157, 248, 255 )
REQUEST DBFCDX
RDDSETDEFAULT ( "DBFCDX" )
SETBALLOON( .T. )
XbrNumFormat( 'E', .t. )
aRowGrad := { { .5, RGB( 232, 241, 252 ), RGB( 232, 241, 252 ) }, ;
{ .5, RGB( 210, 225, 244 ), RGB( 235, 243, 253 ) } }
aSelGrad := { { .5, RGB( 255, 255, 251 ), RGB( 255, 237, 178 ) }, ;
{ .5, RGB( 255, 218, 103 ), RGB( 255, 233, 162 ) } }
USE CUSTOMER
ORDCREATE( ,"CUST1","UPPER(FIRST)", {|| UPPER(FIRST) } , .F. )
ORDCREATE( ,"CUST2","UPPER(LAST)", {|| UPPER(LAST) } , .F. )
DEFINE FONT oFont NAME 'Tahoma' SIZE 0,-14
DEFINE DIALOG oDlg SIZE 780,440 PIXEL ;
FONT oFont TITLE 'XBrowse Gradient Rows FWH 9.12'
DBSETORDER("CUST1")
@ 10,10 XBROWSE oBrw OF oDlg ;
SIZE 380,180 PIXEL ;
COLUMNS 'FIRST', "LAST", 'HIREDATE', 'MARRIED', 'SALARY' ;
ALIAS 'CUSTOMER' NOBORDER AUTOSORT //LINES
oBrw:Married:SetCheck() // Default FWH Bitmap is Alpha
WITH OBJECT oBrw:First
:AddBitmap( '\fwh\bitmaps\open2.bmp' ) // non-alpha bitmap
:bBmpData := { || 1 }
END
WITH OBJECT oBrw:HireDate
:AddBitmap( '\fwh\bitmaps\Alphabmp\task.bmp' ) // alpha
:bBmpData := { || 1 }
END
WITH OBJECT oBrw
:nStretchCol := 1
:nMarqueeStyle := 4
:bClrSelFocus := { || { CLR_BLACK, aSelGrad } }
:bClrRowFocus := { || { CLR_BLACK, aRowGrad } }
* :lSeekBar := .t.
:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
END
oBrw:CreateFromCode()
@ 200,12 BUTTON "Activate/desactivate filter " size 90,20 PIXEL of oDlg ACTION ( oBrw:lGetBar := ! oBrw:lGetBar, oBrw:Refresh())
@ 200,112 BUTTON "Activate filter " size 50,20 PIXEL of oDlg ACTION ( ( oBrw:cAlias )->( SetFilter( oBrw ) ))
@ 200,192 BUTTON "clear filter " size 50,20 PIXEL of oDlg ACTION (( oBrw:cAlias )->( DBCLEARFILTER(), oBrw:Refresh(), oBrw:SetFocus() ))
ACTIVATE DIALOG oDlg CENTERED
CLOSE CUSTOMER
RELEASE FONT oFont
RETURN NIL