Scrolling a RichTextBox

I have a touch screen application which I would like to use UP/Down buttons to scroll a RichTextBox. I''m unclear on how to do the scrolling. Thanks

1 Reply

ST stanleyj Syncfusion Team December 14, 2005 03:35 PM UTC

Hi, See if some code like this helps for your down button, then you may try similar logic for the up button. int newline = this.richTextBox1.Text.IndexOf("\n", this.richTextBox1.SelectionStart); this.richTextBox1.Focus(); if(newline < 0) this.richTextBox1.SelectionStart = this.richTextBox1.Text.Length; else this.richTextBox1.SelectionStart = newline+1; Regards, Stanley

Loader.
Up arrow icon