Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textboxes autoselect upon mouse click?
Message
From
11/05/2001 07:03:33
 
 
To
10/05/2001 13:47:22
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00505893
Message ID:
00506137
Views:
15
Hi!

Originally, mouse supposed to set the text cursor to the point in the text where mouse clicked. Thus, when clicking by mouse on textbox, event when SelectOnEntry is .T. and FORMAT is 'K', the textbox gets not selected. Calling 'this.SetFocus' in the GotFocus or Click event of the textbox solves this. You seems found another solution. In your case, dodefault() runs the default behavior of the GotFocus event one more time. Thus, first time it runs, puts the text cursor where mouse clicked, than second run of the default behavior of the GotFocus cause text selected again.

Seems this functionality is clear...

>It is a documented 'feature?' that the SelectOnEntry=.T. property only takes effect if one uses the keyboard to switch the focus to a Textbox control. In particular, if one uses the mouse to select a control, VFP does not select the entire contents of the control when the control gets the focus.
>
>However, I discovered that placing a dodefault() in the Gotfocus of the textbox does cause VFP to select the contents of a textbox control, even when navigating to the control using the mouse. (Though it does not seem to work this way if the textbox's parent is not a baseclass)
>
>I sure don't get warm fuzzies when an explicit call to the parent's gotfocus clearly does something different than the implicit call that supposedly gets executed when one leaves a method empty.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform