Hi,
I have a strange issue that I'm not too sure on how to fix or address. I'm writing a mini text editor style application - RichTextBox editor.
I need to do some complex parsing after the Selection changes - updating position, selection text and various other bits about the context of the text around the area.
As it takes a bit of processing I don't want it to fire each time the selection changes if the user is scrolling with their arrow keys. I thought of using the Application.Idle but it fires too regularly, I tried a timer but it may fire while the selection arrows are still moving.
What I was thinking of was a countdown timer sort of utility that will reset the timer each time the RichTextBox SelectionChanged event fires, then when the timer hits 500ms or 1000ms it will execute the complex processing runs.
Does this sound like a good idea?