Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Grigore Dolghin
  Where is Grigore Dolghin?
 Bucharest
 Romania
 Grigore Dolghin
 To: Chris Counts
  Where is Chris Counts?
 Bluefield
 West Virginia - United States
 Chris Counts
 Tags
Subject: RE: Select on Entry Problem with VFP 6.0
Thread ID: 470 Message ID: 517 # Views: 3 # Ratings: 0
Version: Visual FoxPro 6 Category: Classes and Objects
Date: Saturday, June 02, 2001 4:40:52 PM         
   


> I am having some problems with the Select on Entry setting on my text boxes. It works fine as long as the user tabs their way through each form, but if they
> click on the textbox then the text is not selected. These are numeric fields that I am dealing with, and I can't figure out how to get it to work. If anyone can help I
> would really appreciate it.
>
> Thanks,
> Chris

Hello.

This behaviour is by design. Originally, the mouse click was supposed to set the cursor at the mouse location. So, this is exactly what it does.

If you want textbox to be selected at the mouse click, you should write the following code in GotFocus event:

DODEFAULT()

In this way you'll force the gotfocus code to be executed once again, so the textbox will be selected. There is no connection between this behaviour and the textbox's datatype -- this trick can be used with every type of data.

In case you use your own textbox class, you should write in the GotFocus method the following line:

textbox::gotfocus()

That :: (scope operator) will force the baseclass textbox to be executed.

Hope this helps
Grigore Dolghin
Class Software

ENTIRE THREAD

Select on Entry Problem with VFP 6.0 Posted by Chris Counts @ 5/31/2001 8:50:28 AM
RE: Select on Entry Problem with VFP 6.0 Posted by Eric den Doop @ 5/31/2001 9:13:54 AM
RE: Select on Entry Problem with VFP 6.0 Posted by Chris Counts @ 5/31/2001 11:11:03 AM
RE: Select on Entry Problem with VFP 6.0 Posted by Paul Culbertson @ 5/31/2001 2:09:04 PM
RE: Select on Entry Problem with VFP 6.0 Posted by rommel santillan @ 5/31/2001 7:45:53 PM
RE: Select on Entry Problem with VFP 6.0 Posted by Dale Dedoroy @ 5/31/2001 9:29:09 PM
Erratum: I realized GotFocus should read Click event. Sorry. Posted by Dale Dedoroy @ 5/31/2001 9:34:35 PM
RE: GotFocus setfocus trick Posted by Ryss Unger @ 6/1/2001 4:07:00 PM
RE: Select on Entry Problem with VFP 6.0 Posted by Grigore Dolghin @ 6/2/2001 4:40:52 PM
What if the textbox is in a grid? Posted by Khalil Shaddad @ 1/9/2004 2:55:23 PM
RE: What if the textbox is in a grid? Posted by Travis Pick @ 1/9/2004 9:10:01 PM
RE: What if the textbox is in a grid? Posted by Khalil Shaddad @ 1/12/2004 7:54:09 AM