How do I find cursor position inside textbox? 
Author Message
 How do I find cursor position inside textbox?

How do I find the cursor location inside a textbox? I need a variable
that returns the current character position within a textbox. Please

                    Thank you,

                    Perry K. Burdick



Mon, 06 Aug 2001 03:00:00 GMT  
 How do I find cursor position inside textbox?
Hi Perry,

You could use the text box's onkeydown event or the onchange event to
determine when a user presses a key and update a global variable
accordingly.  OnKeyDown is a better choice because you can also determine if
there were any arrows pressed AWA the End and Home keys.

HTH



Mon, 06 Aug 2001 03:00:00 GMT  
 How do I find cursor position inside textbox?
Use the SelStart property.

Ex:
iPos = Text1.SelStart

This defeats the purpose of newsgroups.  Responses should always be posted
for everyone's benefit.

Regards,
Rob

------------
Robert D. Barnes, MCP
DSD Inc
http://www.dsdcorp.com

Quote:

>How do I find the cursor location inside a textbox? I need a variable
>that returns the current character position within a textbox. Please

>                    Thank you,

>                    Perry K. Burdick



Mon, 06 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Finding the cursor position within a textbox

2. HOWTO find the cursor position in a textbox?

3. Q: textbox - focus - cursor position

4. How to get the position of the cursor in a TextBox

5. Determining cursor position in a textbox

6. X,Y Absolute Position of A cursor in Textbox control

7. Setting the Cursor in a textbox (after using inStr to get the position)

8. Cursor position in a textbox

9. Cursor position in a TextBox

10. help with cursor position in textbox

11. Positioning Cursor in textboxes

12. Positioning cursor in textbox

 

 
Powered by phpBB® Forum Software