Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I set the property of a button from a procedure?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00092543
Message ID:
00092657
Views:
20
>>How can I set the property of a button from a procedure?
>>From a menu option and in a procedure file, I want to enable
>>a button on my form. any ideas?
>
>Rob,
>
>I think you and Ed were getting lost in all the auto-replies. Here's what I believe what Ed was telling you.
>
>1. In order for this to work, you'll first need a global variable that can be initialized from the menu. For the sake of this example, I'm calling it goForm.
>
>2. In you're menu command line, assuming that the form is MyForm, you'd have:
>
>DO FORM MyForm NAME goForm LINKED
>
>3. Now to set a command button as enabled, assume its name is MyCmndBtn in your proccedure:
>
>goForm.MyCmndBtn.Enabled = .T.
>
>That should do it. Ed, isn't this what you were trying to tell Rob.

Fistly, I didn't get lost. Surely, global variable will work Ok, but you and me know that OO-way is to keep form references in application or top-level form object properties/collections.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform