tags:

views:

116

answers:

1

TextChangedEventArgs is being fired twice in my RichTextBox control.

Is this normal?

Also, when will e.Changes (you know the TextChangedEventArgs) be > 1. The only case I can think of is someone pasting content into it.

But other times it seems in normal typing a person can really only change 1 paragraph right?

+1  A: 

Without seeing the code it's going to be very difficult to diagnose the problem.

However, having said that have you subscribed to the TextChanged event twice? I've had cases like this where the code to subscribe is either in the wrong place or not matched by code unsubscribing from the event.

ChrisF
Do I have to unsubscribe from the event as well!?
halivingston
@halivingston - it depends on where you subscribe to it. If you do it once in a constructor (say) then it's not always necessary. However, if you subscribe on a button press (say) then yes you should unsubscribe.
ChrisF