Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Go to specific location in a text box
Message
From
01/06/2007 08:54:37
 
 
To
31/05/2007 22:04:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01229658
Message ID:
01229767
Views:
29
This message has been marked as the solution to the initial question of the thread.
I have a text box with an input mask of '0-99999' and a format of K. I would like the cursor to be in the 3rd column, i.e. after the '0-' when entering new data.

This code in the GotFocus():
Textbox::GotFocus()
This.SelStart = 3
NODEFAULT
The reason you have to do it like this is because, by default, the native VFP method code ( if there is any ) runs after any of your custom code. The native behavior of GotFocus() is to reset SelStart and SelLen. So you need to have the native behavior occur before you set these properies and not after.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform