Here is a section of code that uses FWH 7.10, xHarbour, tSBrowse, and tData ( data object extension ). If I click on the delete button, the browse removes the record, moves to the next record, but the edit control is not updating. I have a feeling I'm missing something ... just not getting through to my brain right now. This code is cut from the full function which has some more edit and label controls.
Tim
FUNCTION list01
// Declare LOCAL variables
LOCAL oDbl, oEdit, lFirst := .F.
// Open the labor rate reference database and index
oDbl := tdata():new(, "erflab" )
oDbl:use()
oDbl:setorder( "erflab" )
oDbl:gotop()
DEFINE DIALOG oDlg RESOURCE "LISTS" OF oWnd TITLE "Labor Rates" FONT oWnd:oFont
// Build the button controls
REDEFINE BUTTON ID 107 of oDlg ACTION( IIF( MsgYesNo( "Do you wish to delete this item ?"), ( oDBl:delete( ),;
oDlg:update()),)) MESSAGE "Delete the current item"
.....
// Build the edit controls
REDEFINE GET oEdit VAR oDbl:charge ID 102 OF oDlg PICTURE "$99999.99" MESSAGE "The charge for this service" UPDATE
REDEFINE GET oDbl:servic ID 103 OF oDlg MESSAGE "A description of the service type" UPDATE
.....
// Create the BROWSE control
REDEFINE BROWSE oLbx1 ID 101 OF oDlg ON CHANGE oDlg:update() UPDATE
oLbx1:setoDBF( oDbl )
add column to oLbx1 header "Charge" data oDbl:charge ALIGN 2,1 size 120
add column to oLbx1 size 25
add column to oLbx1 Header "Service" data oDbl:servic ALIGN 0,1 size 400
.....
// Activate the dialog screen
ACTIVATE DIALOG oDlg
// Close the file
oDbl:close()
RETURN NIL