Get cursor position in textbox?

Discussion in 'Questions (Windows Mobile)' started by tsteward, Aug 7, 2008.

  1. tsteward

    tsteward Active Member Licensed User

    How can I get the cursor position in a multiline textbox.
    I want to programatically enter text at the cursor position

  2. agraham

    agraham Expert Licensed User

    Textbox.SelectionStart sets and returns the cursor position in the string in the text box. Identifying the cursor as line number and position in line is not easily done.
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. tsteward

    tsteward Active Member Licensed User

    Turns out its quit easy
    i = TextEdit.SelectionStart
     TextEdit.Text  = StrInsert(TextEdit.Text,i,
     TextEdit.SelectionStart = i + 
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice