I can create my controls all fine and dandy, but I want to point their events to a function I wrote. This is easily done in VB6, but I need it for VFP6. Here's a sample of what I have:
------------------------------------------------------------
with thisform
.addobject("txt"+alltrim(questions->disporder),"TEXTBOX"
contname="txt"+alltrim(questions->disporder)
.&contname..left=25
.&contname..top=lastbottom
.&contname..value=""
.&contname..visible=.t.
.&contname..tabindex=lasttab
.&contname..maxlength=255
.&contname..width=255
.&contname..Valid=ValidAns(.&contname)
endwith
------------------------------------------------------------
As you can see I'm trying to assign the Valid Event of the textbox to the ValidAns function.
When I run the project and leave the textbox, the code in the ValidAns function actually runs, but then I get an error saying the valid property is read only.
any ideas?
------------------------------------------------------------
with thisform
.addobject("txt"+alltrim(questions->disporder),"TEXTBOX"
contname="txt"+alltrim(questions->disporder)
.&contname..left=25
.&contname..top=lastbottom
.&contname..value=""
.&contname..visible=.t.
.&contname..tabindex=lasttab
.&contname..maxlength=255
.&contname..width=255
.&contname..Valid=ValidAns(.&contname)
endwith
------------------------------------------------------------
As you can see I'm trying to assign the Valid Event of the textbox to the ValidAns function.
When I run the project and leave the textbox, the code in the ValidAns function actually runs, but then I get an error saying the valid property is read only.
any ideas?