Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd textbox behaviour
Message
From
31/03/2003 14:18:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00771458
Message ID:
00772109
Views:
8
>>>Just this TopLevel form application. The other applications I have are not in a top level form, and they do not have that same behaviour.
>>
>>Another workaround, alternative to Alan's suggestion, and one that doesn't require custom code, is to change .SelectOnEntry = .T.
>
>Thank you Hilmar,
>
>I found another workaround, Keeps the behaviour just as I expect it to be, without a worry of when a user enters the textbox highlighting some text with the mouse.
>In the LostFocus Event, add the following line:
>
This.SelStart = 0
>
>Tracy

That looks both simple and effective.

Suggestions: 1) Don't forget you can do this in your base classes. 2) You may want to make this dependent on some condition; for instance:
if not This.SelectOnEntry
  This.SelStart = 0
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform