none
vb.net autoscolling textbox RRS feed

  • Question

  • Hi!!

    im developing like a chatbot.

    i got a vertical scroll. when it is so much text (multiline) that it doesnt fit the scroll enables but it stayes at the top and i need to scroll down after every text update. so i want to be in the button but still be able to scroll up and down.

    So every time the text updates i want to scroll down.


    If you don´t Believe in it, Then it Doesn´t Exist!
    Tuesday, July 6, 2010 9:03 PM

Answers

  • Hi,

    If you are using a Windows Forms App, try this in textbox textchanged event:

      TextBox1.SelectionStart = TextBox1.Text.Length
      TextBox1.ScrollToCaret()

    --------------

    Ricardo

    • Proposed as answer by .paul. _ Tuesday, July 6, 2010 11:38 PM
    • Marked as answer by Simon PH3K Wednesday, July 7, 2010 9:13 AM
    Tuesday, July 6, 2010 11:35 PM

All replies

  • Hi,

    If you are using a Windows Forms App, try this in textbox textchanged event:

      TextBox1.SelectionStart = TextBox1.Text.Length
      TextBox1.ScrollToCaret()

    --------------

    Ricardo

    • Proposed as answer by .paul. _ Tuesday, July 6, 2010 11:38 PM
    • Marked as answer by Simon PH3K Wednesday, July 7, 2010 9:13 AM
    Tuesday, July 6, 2010 11:35 PM
  • Hi,

    If you are using a Windows Forms App, try this in textbox textchanged event:

      TextBox1.SelectionStart = TextBox1.Text.Length
      TextBox1.ScrollToCaret()

    --------------

    Ricardo


    thanks you made my morning :)

    If you don´t Believe in it, Then it Doesn´t Exist!
    Wednesday, July 7, 2010 9:14 AM