I’m making an IRC client where the chat is displayed in a multi-line TextBox control named chatBox. Below the chat there is a single-line textBox named editBox where the user enters messages. I want the user to be able to scroll in the chatBox even while the editBox has the focus. Is there any way I can do that?
I’ve looked at the events for textBox and I can’t find anything resembling a scroll event, and I’ve searched Google for an answer with no success.
You can’t scroll directly, but you can move the cursor. You can move the cursor to the end of a text box, for example, with
textBox.SelectionStart = textBox.Text.Length.By manipulating the selection you can emulate scrolling by using
textBox.ScrollToCaret().