Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox property - Select on Entry
Message
From
19/12/2002 09:14:44
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00734203
Message ID:
00734457
Views:
20
Sorry, of course you're right. My mind was trapped on .Value rather than .Text

Alan

>It's always text regardless of the Value property type and represent unformatted Value in the text form.
>
>>If the This.Text is numeric?
>>
>>Alan
>>
>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform