Hepen
asked on
How to keep a vertical scrollbar on a multiline textbox always scrolled down?
How to keep a vertical scrollbar on a multiline textbox always scrolled down?
My multiline textbox is being used as a chat text box. When the text inside gets too big I have to trim the top but keep the chat contents on the bottom.
If txtMessageHistory.Text.Len gth > 2048 Then
'take the last 2048 characters and set that
txtMessageHistory.Text = txtMessageHistory.Text.Sub string(txt MessageHis tory.Text. Length - 2048, 2048)
'scroll the scrollbar all the way down
?? HELP
End If
The scrollbar gets set all the way up instead of staying scrolled down.
Any suggestions?
My multiline textbox is being used as a chat text box. When the text inside gets too big I have to trim the top but keep the chat contents on the bottom.
If txtMessageHistory.Text.Len
'take the last 2048 characters and set that
txtMessageHistory.Text = txtMessageHistory.Text.Sub
'scroll the scrollbar all the way down
?? HELP
End If
The scrollbar gets set all the way up instead of staying scrolled down.
Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
txtMessageHistory.Selectio