General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only