Matt
Matt

Reputation: 22143

Which event captures every edit to a RichTextBox?

I need to update the formatting of a rich text box after any change is made to the text (for example when the user presses a key and inserts a character). How can I do this?

KeyDown occurs too early and would not account for holding a key down anyway, KeyUp occurs too late, and neither would account for a cut or paste with the mouse.

It would be even better to receive to get this event before the change even appears on screen.

Upvotes: 3

Views: 1594

Answers (1)

Robert Levy
Robert Levy

Reputation: 29083

Use the TextChanged event to know whenever the text has changed

Upvotes: 1

Related Questions