Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default object
Message
From
11/09/2003 00:46:29
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00827739
Message ID:
00828062
Views:
15
No .. I missed something: when you refered to the "default object", I didn't know you were refering to the ".Default property".

Anyway, for the most part, only CommandButtons have a .Default property; so you don't have to evaluate "every" object.

Add a property to your Form to hold a reference to the "default control", and then in the Init event of your button's base class, set this Form property to THIS when THIS.Default = .T.

>Thanks
>
>However what I was trying to do was shortcut evaluating every object to find it's .Default property and find one that was set to .T. - obviously finding the first one can stop the loop, but it's still a pain.
>
>Have I missed something obvious?
>
>Regards
>Simon
Previous
Reply
Map
View

Click here to load this message in the networking platform