Scroll action for a RTB object.
-
I need some help, or maybe just a reasonable suggestion to point me in the right direction. I'm using a RichTextBox to display information in a single user app. I'm adding text to this RTB by way of a TextBox. My issue is this. I can't seem to find a simple way to cause the RTB to display the lastest text that was sent to it, since the text it at the bottom of the RTB. Once I send the new text I need the RTB to scroll to the bottom so the last text is visible. I have tried a API but I not having any luck. Any suggestions? Thanks for any help. T
-
I need some help, or maybe just a reasonable suggestion to point me in the right direction. I'm using a RichTextBox to display information in a single user app. I'm adding text to this RTB by way of a TextBox. My issue is this. I can't seem to find a simple way to cause the RTB to display the lastest text that was sent to it, since the text it at the bottom of the RTB. Once I send the new text I need the RTB to scroll to the bottom so the last text is visible. I have tried a API but I not having any luck. Any suggestions? Thanks for any help. T
Yes it is try this
Public Sub DisText(ByVal text As String) txtmsgsrv.SelectionColor = ColorRes ' txtmsgsrv.Focus() txtmsgsrv.AppendText(text) txtmsgsrv.Refresh() txtmsgsrv.Focus() txtmsgsnd.Focus() ' txtmsgsrv.SelectionColor = Color.Black End Sub
Hope this helps u, Ravi. -
I need some help, or maybe just a reasonable suggestion to point me in the right direction. I'm using a RichTextBox to display information in a single user app. I'm adding text to this RTB by way of a TextBox. My issue is this. I can't seem to find a simple way to cause the RTB to display the lastest text that was sent to it, since the text it at the bottom of the RTB. Once I send the new text I need the RTB to scroll to the bottom so the last text is visible. I have tried a API but I not having any luck. Any suggestions? Thanks for any help. T
It gets simpler:
RTB1.SelectionStart = RTB1.TextLength RTB1.Focus() RTB1.ScrollToCaret()
RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome