Discussion:
Specifying cursor location in VBDOS text.box
(too old to reply)
MagAero Systems
2004-09-21 17:12:00 UTC
Permalink
VBDOS

Is there a way to set where the cursor will be in a text box? Here's what I'm
trying to do. I have a text box on a form, and when the form loads, and the
text box gets focus, the current date is displayed in the text box. The cursor
is located under the left most character of the date. I would like the cursor
to be located at the first blank space to the right of the date, so
back-spacing would remove the date characters one at a time starting with the
right-most character. Any ideas?
Thanks,

Mike
##
Geo
2004-09-22 11:35:23 UTC
Permalink
Post by MagAero Systems
I would like the cursor
to be located at the first blank space to the right of the date, so
back-spacing would remove the date characters one at a time starting with the
right-most character. Any ideas?
Assuming text box named text1 then
text1.selstart=len(text1.text)
should do it I think...

Geo

Loading...