Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency textbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00532527
Message ID:
00533996
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
Hi Cecil.

>> I didn't understand that you could place the command, NODEFAULT, anywhere in the event and it would signal to the base class (parent class) to not execute its normal routine. <<

NODEFAULT prevents the VFP base class behavior from executing. If you are in a subclass of a custom class, putting anything (even a comment) in a method over-rides the parent class behavior. So yes, putting a NODEFAULT in method code will effective over-ride all inhertited behavior all the way up the tree to the base class < s >. Unless, of course, there is a DODEFAULT() before the NODEFAULT. In this case, you get augmented behavior of the parent class and suppress the native VFP base class behavior.

>> I originally though that there was some significance to it being at the end of your code as displayed below: <<

Yep. As I said, the native VFP base class behavior of GotFocus() resets SelStart and SelLength. So you want this behavior to occur first. Then you set your properties to select the entire balue of the text box and supress it afterwards. The NODEFAULT at the end is required because VFP will normally execute any custom code in your method and run its native default behavior last. I did this to change when the base class behavior was executed.

HTH

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform