Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DoDefault()
Message
From
10/03/2004 18:08:25
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00884980
Message ID:
00885037
Views:
12
Nirav,

VFP does not select a textbox when it is clicked. There is probably code in the GotFocus() of the parent class that causes this to happen. You'll see either This.SetFocus() or manipulation of This.SelLength in the method. See the KiloFox book for more info on this (this is the first tip I've used since buying the book recently). Still, it seems like this code is in the wrong place. The check for This.SelOnEntry should be in the class, not the textbox on the form.

>Yes, Daniel, that's what I thought. But testing it out with two textboxes, both with SelectOnEntry set to TRUE, but adding
>
DODEFAULT()
>to the GotFocus method of one of them produced different results. The one with DODEFAULT actually got "selected" when I clicked in it. The other didn't.
>
>Also, it seems to me that the "if This.SelectOnEntry" part is unnecessary. With the Dodefault code, if the flag is set to TRUE, then it will select the text, otherwise it won't.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Previous
Reply
Map
View

Click here to load this message in the networking platform