REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oClients
USE CUSTOMER NEW SHARED VIA "DBFCDX"
SET ORDER TO TAG FIRST
GO TOP
DATABASE oClients
DEFINE WINDOW oWnd TITLE FWVERSION + " : " + hb_compiler()
DEFINE BUTTONBAR oBar SIZE 100,32 2007
DEFINE BUTTON OF oBar PROMPT "Dialog" CENTER ;
ACTION ShowDialog( oClients )
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
//----------------------------------------------------------------------------//
function ShowDialog( oClients )
local oDlgCSE, oFldCSE, oLBxcl, oBarCL, oBrush
local oWnd := WndMain()
local aTit := { "aTit[1]" }
// Here is the dialog creation:
DEFINE BRUSH oBrush FILE "..\bitmaps\backgrnd\marble5.bmp"
DEFINE DIALOG oDlgCSE RESOURCE "CLISVCw" BRUSH oBrush TRANSPARENT OF oWnd ;
TITLE FWVERSION + " : " + hb_compiler()
// Define the folder
REDEFINE FOLDEREX oFldCSE ID 1600 OF oDlgCSE ;
PROMPT " &Client ", " "+aTit[1] + " " ;
DIALOGS "EDITCLIw" ; //, "EDITVEHw" ;
ROUND 5 TRANSPARENT
oFldCSE:aGradUnSel := { { 0.50,16776960,16777215 }, { 0.50,16777215,16776960 } }
oFldCSE:aGradOverUnSel := { { 0.25, nRGB( 100, 149, 237 ), nRGB( 100, 149, 237 ) },{ 0.75, 16777215,16776960 } }
REDEFINE BUTTONBAR oBarCL ID 101 OF oFldCSE:aDialogs[ 1 ] 2007
DEFINE BUTTON OF oBarCL FILE "..\bitmaps\32x32\quit.bmp" PROMPT "Close" ACTION oDlgCSE:End()
// Define the control
REDEFINE XBROWSE oLBxcl ;
DATASOURCE oClients ;
AUTOCOLS ;
; //HEADERS "Account", "Client", "City", "Phone", "Cellular", "Email", "Last Visti", "Total Sales", " " ;
; //COLUMNS "acrnum", "clicom", "clicty", "clipho", "clicel", "clieml", "clidls", "acrytd", " " ;
ID 860 ;
OF oFldCSE:aDialogs[ 1 ];
; //ON CHANGE ( oClientsr:load(), oFldCSE:aDialogs[ 1 ]:update() ) ;
; //ON DBLCLICK ( lCliScoped := oServiceUnits:ScopeUnits( oClientsr, lCliScoped ), oLbvm:refresh( ),oServiceUnitsr:load( ), oFldCSE:aDialogs[2]:update( ),oFldCSE:setoption(2) ) ;
AUTOSORT UPDATE
// Provide the header gradient and styles
// oLbxcl:bClrGrad := aPubGrad
oLbxcl:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbxcl:nColDividerStyle := LINESTYLE_RAISED
oLbxcl:nRowDividerStyle := LINESTYLE_RAISED
oLbxcl:nHeadStrAligns := AL_CENTER
oLbxcl:nStretchCol := STRETCHCOL_LAST
// Use for incremental search on opened database
oLbxcl:bSeek := { |c| oClients:Seek( Upper( c )) }
oLbxcl:lSeekBar := .t.
oLbxcl:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
// Activate the dialog
ACTIVATE DIALOG oDlgCSE ;
; //ON INIT ( oReBar:hide(), oBarCL:lTransparent := .F., oBarVE:lTransparent := .F.) ;
; //ON PAINT oFldCSE:setoption(nType)
CENTERED
return nil