Results 1 to 4 of 4

Thread: Setting focus to end of text in textbox [Resolved]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Location
    Michigan
    Posts
    107

    Setting focus to end of text in textbox [Resolved]

    How can I set the focus to the end of existing text when the focus switches to a multi-line textbox, i.e. the cursor should be at the next line, w/o any highlighted text? Thanks.
    Last edited by trutta; Mar 4th, 2003 at 01:31 PM.

  2. #2
    Frenzied Member McGenius's Avatar
    Join Date
    Jan 2003
    Posts
    1,199
    VB Code:
    1. Private Sub Text2_GotFocus()
    2.     Text2.SelStart = Len(Text2.Text)
    3. End Sub
    McGenius

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Location
    Michigan
    Posts
    107
    Thank you, that works great. Between a cold & medicine it's hard to think straight today.

  4. #4
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    Originally posted by trutta
    Between a cold & medicine it's hard to think straight today.
    What medicine are you taken? Fill better!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width