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.
Unfortunately, activation email could not send to your email. Please try again.

Scrolling a RichTextBox

Thread ID:

Created:

Updated:

Platform:

Replies:

38340 Dec 9,2005 03:37 PM Dec 14,2005 10:35 AM Windows Forms 1
loading
Tags: Tools
John Slater
Asked On December 9, 2005 03:37 PM

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 10:35 AM

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

CONFIRMATION

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.

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.

;