Hi all,
I have a form class which is passed a local variable by reference in the init method. This variable specifies the value of a control on the form. I need to set the controlsource of the control to this reference or set the value of this variable when the form is released. Any ideas???
Bare-bones example:
LOCAL lcName
lcName = "John Q. Public"
loForm = CREATE("TestForm",@lcName)
loForm.SHOW()
?lcName && This has to be the value typed into the form
DEFINE CLASS TestForm AS Form
ADD OBJECT txt1 AS TextBox
PROCEDURE INIT
LPARAMETER p1
** THIS.txt1.CONTROLSOURCE = p1 && this doesn't work
** THIS.txt1.VALUE = p1 && sets value of control but user input does not change value of lcName
ENDPROC
PROCEDURE DESTROY
** lcName = THIS.txt1.VALUE && this obviously won't work - lcName needs to be local to the calling procedure
ENDPROC
ENDDEFINE
Brien R. Givens
Brampwood Systems