Cursor position in textbox

R

Randy Dod

Is there a way to tell where the cursor is located in a
textbox at any given moment? I specifically need to know
where the cursor is located in the sentence the user is
currently typing. The CurLine property is great, but CurX
only tells me in pixels where I am relative to the whole
form, and of course it varies depending on the font you
use. I need to check as the user types if what they are
typing matches any autotext or autocorrect entries.

Thanks in advance for any help.
 
J

Jonathan West

Randy Dod said:
Is there a way to tell where the cursor is located in a
textbox at any given moment? I specifically need to know
where the cursor is located in the sentence the user is
currently typing. The CurLine property is great, but CurX
only tells me in pixels where I am relative to the whole
form, and of course it varies depending on the font you
use. I need to check as the user types if what they are
typing matches any autotext or autocorrect entries.

Thanks in advance for any help.

Hi Randy,

Take a look at the SelStart property which tells you the cursor position in
characters within the textbox.
 
R

Randy Dod

Hi Randy,
Take a look at the SelStart property which tells you the cursor position in
characters within the textbox.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


Jonathan,
Thank you so much, that's just what I needed! I forgot
all about that property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top