Handling Events
I have a form with a lot of controls (comboboxes, textboxes, checkboxes) and and "Update" button that I want enabled anytime a change is made on the form.
What would be the best way to handle the change events from the various controls or should I ask is there a simple way to do this when the form loads?
Add a handler or sorts?
Thanks in advance.
DanielPosted Jun 15, 2007, 1:43 PM
Mike GoldPosted Jun 15, 2007, 1:46 AM
Hi Daniel,
The way I've done this in the past is to wire event handlers for all the controls that effect the control logic and call a ControlLogic method inside the event handler that handles the logic for every control. In general, for text boxes, use the TextChanged event. For List Boxes, the SelectionChanged event, for checkboxes and radio buttons, the Click event.