by davidlim » Wed May 14, 2008 7:00 am
yes, i am programmer, just pick up FWH, quit confuse with DEFINE and REDEFINE, here is the source codes:-
DEFINE DIALOG oDlg RESOURCE "DebtorMaintenance"
REDEFINE GET oGetCode VAR cCode ID 110 OF oDlg Picture "@!"
REDEFINE BTNBMP oBtn1 ID 115 OF oDlg
FILENAME "c:\fwh\bitmaps\search.bmp" ACTION ( SelectCode(
oGetCode, cCode ), oGetName:VarPut( ArCust->Name ) ,;
oGetAdd1:VarPut( ArCust->Add1 ) ,;
oGetAdd2:VarPut( ArCust->Add2 ) ,;
oGetTeln:VarPut( ArCust->Teln ) ,;
oGetFaxn:VarPut( ArCust->Faxn ) ,;
oGetName:Refresh() ,;
oGetAdd1:Refresh() ,;
oGetAdd2:Refresh() ,;
oGetTeln:SetFocus() ,;
oGetFaxn:Refresh() ,;
oGetName:SetFocus() )
REDEFINE GET oGetName VAR cName ID 120 OF oDlg VALID ! Empty(
cName )
REDEFINE GET oGetAdd1 VAR cAdd1 ID 130 OF oDlg
REDEFINE GET oGetAdd2 VAR cAdd2 ID 140 OF oDlg
REDEFINE GET oGetTeln VAR cTeln ID 150 OF oDlg
REDEFINE GET oGetFaxn VAR cFaxn ID 160 OF oDlg
REDEFINE BUTTON ID ID_SAVE OF oDlg ACTION ( lSave := .T.,
oDlg:End() )
REDEFINE BUTTON ID ID_DELETE OF oDlg ACTION ( lDelete := .T.,
oDlg:End() )
REDEFINE BUTTON ID ID_CANCEL OF oDlg ACTION oDlg:End() CANCEL
ACTIVATE DIALOG oDlg CENTERED
...
Thanks and appreciate for your kind attention and help.
_________________
asking for help and willing to help others