Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SelectOnEntry in Textbox
Message
From
02/12/2003 16:05:11
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
SelectOnEntry in Textbox
Miscellaneous
Thread ID:
00855187
Message ID:
00855187
Views:
60
Hello,

I tried to get the following done, but it does not work:
When the user clicks into a textbox, the text should be selected, exactly as when tabbing into the textbox and the property .SelectOnEntry = .T.

There is a FAQ by Evan Delay, 7867, that suggests to put DODEFAULT() into the GotFocus() event of the textbox, but that does not show results.

I tried the following in the GotFocus() event:
THIS.SelStart=0
THIS.SelLength=LEN(ALLTRIM(TRANSFORM(THIS.VALUE)))
This would work relatively fine, except when the value is longer than the textbox shows, which results in shifting the entire selected text to the left. That is confusing for the user.

Is there a way to accomplish this?
Thanks for your help in advance!
Christian Isberner
Software Consultant
Next
Reply
Map
View

Click here to load this message in the networking platform