Rich text edit auto scroll

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;;
 
G

Guest

Hi Ed,

You can use the ScrollToCaret method in the RichTextBox control

Cheers,
Steve Goodyear
 
G

Guest

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;;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top