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