Rich text edit auto scroll

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all:

I'm using a Rich Edit Text box to display debug info for my app, I can't
seem to make the control scroll down to the bottom autmatically whenever I
append a new text string (AppendText()). Could someone point me in the right
direction.


Thanks
Ed;;
 
Hi Ed,

You can use the ScrollToCaret method in the RichTextBox control

Cheers,
Steve Goodyear
 
Thanks Steve,

Here is a more complete snippet....

int num = m_txtEditor.TextLength ;
m_txtEditor.AppendText("some text"+ Environment.NewLine);
m_txtEditor.Select( num, m_txtEditor.TextLength - 1 );
m_txtEditor.ScrollToCaret();


Ed;;
 
Back
Top