the test source to try :
when I press "Insert" the value lFirstrow is changed but it not refresh the dlg and not insert the new control
- Code: Select all Expand view
#include "fivewin.ch"
Function test()
Local lFirstrow :=.T.
Local ctext1:=space(10),ctext2:=space(10) ,cField
local aGet[3]
Local aItems :={'FIRST','LAST','STREET','CITY','STATE'}
DEFINE DIALOG oDlg SIZE 500,500
IF !lFirstrow
@ 120,10 GET aGet[1] VAR ctext1 OF oDlg size 40,10 PIXEL
ENDIF
@ 120,58 COMBOBOX aGet[2] VAR cField ITEMS aItems OF oDlg SIZE 50,60 PIXEL STYLE CBS_DROPDOWN
@ 120,195 GET aGet[3] VAR ctext2 OF oDlg size 45,10 PIXEL
@5,20 BUTTON oBtn PROMPT "Insert" ACTIOn ADD( lFirstrow,oDlg,aGet)
ACTIVATE DIALOG oDlg
RETURN NIL
Function ADD( lFirstrow,oDlg, oControl)
lFirstrow:=.F.
odlg:update()
RETURN NIL