[.net] Forms & Events - how to catch any child control being changed?

Started by
1 comment, last by BTownTKD 15 years, 9 months ago
Hey all - I have a form that contains multiple controls (obviously) and I have a small text box at the bottom, which I would like to update any time ANY of the controls are changed within the window. Is there some kind of catch-all event that gets posted, any time a control is changed within a form? Thanks, -Brian p.s. My alternative is to use a timer, which updates the textbox every few milliseconds; it's supposed to be kind of a "live preview."
Deep Blue Wave - Brian's Dev Blog.
Advertisement
No, there's not. Just create a function and assign the specific event for each control to it. Most of the events you'll want to capture are pretty standard in their signature:

private void ControlChanged(object sender, EventArgs e){   //check the type of control here and the correct property for that type of control}


If a specific type of control has a different signature, create a function for that control type and have it call this one.

Quote:p.s. My alternative is to use a timer, which updates the textbox every few milliseconds; it's supposed to be kind of a "live preview."

No, no, no, no, no!

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Quote:Original post by Machaira
No, no, no, no, no!


Lol.

Thanks!
Deep Blue Wave - Brian's Dev Blog.

This topic is closed to new replies.

Advertisement