[.net] Forms & Events - how to catch any child control being changed?
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."
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:
If a specific type of control has a different signature, create a function for that control type and have it call this one.
No, no, no, no, no!
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!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement