Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox property - Select on Entry
Message
 
 
To
18/12/2002 19:14:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00734203
Message ID:
00734350
Views:
24
Hi Marcia,

Wouldn't
This.SelLength = LEN( This.Text )
work?


>Is there a way to make VFP select all of a textbox when it gets focus?
>
>In addition to what Fred and Armin told you, if you are going to go this route in the GotFocus(), you need to do it in a manner similar to this:
>
>
>Textbox::GotFocus()
>This.SelStart = 0
>This.SelLength = LEN( TRANSFORM( This.Value ) )
>NODEFAULT
>
>
>The reason is that the default VFP GotFocus behavior ( and by default the native behavior executes at the end of the method after your custom code ) resets SelStart and SelLength. So what you need to do is run the native code before your custom code and suppress it afterwaRD.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform