Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Positioning cursor in an editbox
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00048699
Message ID:
00048812
Views:
27
Bret,

Here's code that works for me;

DODEFAULT()
THIS.SelStart = LEN(EVAL(THIS.ControlSource))
THIS.SelLength = 0
NODEFAULT

I didn't mention that you must do a DoDefault() at the start so focus will get to the editbox, but then you chage the selstart and sellength and issue a NODEFAULT to prevent the default setting from occuring after your settings. Essentially you are making the default code run BEFORE your code.

BTW, I also noticed that if you don't set the sellength the insertion point ends up inthe wrong place.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform