Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Property click is read only
Message
From
06/11/2000 15:18:29
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00438468
Message ID:
00438501
Views:
13
>>>I am getting "property click is read only" when I attempt to programatically set a commandbuttons click method. Can this be done programatically?
>>
>>How are you trying to set it?
>>If at design time, you can use WriteMethod()
>>It cannot be done at run time.
>
>I tried this:
>zForm = CREATEOBJECT('Form')
>zForm.AddObject('cmd1','CommandButton')
>zForm.cmd1.Caption = 'Process call nbr' && Caption on the Command button
>zForm.cmd1.Click='Release thisform'

That's considered run time, so this feature not available.

Even at design time, the line
>zForm.cmd1.Click='Release thisform'
wouldn't work, because only properties can be set this way.

It is a weird error message to get, though...

fwiw - at design time, you can get a reference to the button and use WriteMethod(), e.g.
** hover mouse cursor over the button then
ox = SYS(1270)
ox.WriteMethod("Click","thisform.Release()")
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform