We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Scrolling a RichTextBox

Thread ID:





38340 Dec 9,2005 08:37 PM UTC Dec 14,2005 03:35 PM UTC WinForms 1
Tags: Tools
John Slater
Asked On December 9, 2005 08:37 PM UTC

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

stanleyj [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon