CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Textbox automatic scrol down

    Is it possible to let a textbox control automatically scroll down when the text has changed.
    eg:


    private sub addText(byval myText as string)
    txtOut.text = txtOut.text & vbcrlf & myText
    End Sub




    So when the text in txtOut becomes to large to display, it should scroll down so the last thing added should be visible. This is for a log window, so the event last happend should be at the bottom of the textbox control.

    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  2. #2
    Join Date
    Jan 2000
    Location
    MX
    Posts
    51

    Re: Textbox automatic scrol down

    add this to your code:

    txtOut.SelStart = len(txtOut)

    this should send the cursor to the end of the textbox.



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

Featured