When a text box gets focus how do you highlight the text?
I was thinkin you could use the len() command to find the length of the text and then the selstart or sellength.I cant seem to get it to work, does anyone have some hints?
With the DB Window visible. From the Menu select Tools->> Options, select the Keyboard Tab, under "Behaviour Entering Fields" select "Select Entire Field".
Bills method above sets this selection behaviour as the default whenever a control on a form gets the focus. If you want to select the entire contents of a control where its not already selected, just press the F2 key when the control has the focus. Pressing it again, deselects the contents and puts the cursor at the end of the content. I find that its good to teach the users about these sorts of keys anyway.
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
I find it very interesting seeing other members' suggesting other methods besides my own. I had't thought of F2 so both deserve being marked as helpful.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.