Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Focus to certain position in Text Box Help Please
Message
From
02/07/1999 17:30:05
 
 
To
02/07/1999 17:10:42
Doug Hitchcock
Illinois State University
Normal, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00237059
Message ID:
00237070
Views:
11
>Scenario:
>
>I set the value of a textbox from a different control, and then I want to set the focus to that control. When I do that I'd like for the cursor to be AFTER the value that's in there.
>
>Specifically, it's a phone number field, and I want it to automatically put in the Area code, and then set the focus to that box, placing the cursor after the area code (309| ) instead of in front.
>
>I don't know how to do this, and I tossed it around here and got no ideas. Please drop some ideas if you have any.
>
>Thanks!

Set the textbox's .SelStart to where you want to be (0 based) and .SelLength to be 0. You should be able to do that in GotFocus.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform