G
Guest
This must be a common probem for GUI designers, but one which I'm not sure of
the conventional wisdom.
I have a number of controls which are enabled/disabled according to the
states of other controls.
Do I...
1. Do all the enabling/disabling on the fly, in the handlers for the
controls which they depend on?
2. Create a method called UpdateControls, which does all the processing in
one place, and invoke it whenever the state of the form changes?
UpdateControls is less efficient, because it means that all state-dependant
controls are reviewed every time, but it is safer, because it keeps all the
logic in one place.
Is there a better way, or should I just learn to love UpdateControls?
the conventional wisdom.
I have a number of controls which are enabled/disabled according to the
states of other controls.
Do I...
1. Do all the enabling/disabling on the fly, in the handlers for the
controls which they depend on?
2. Create a method called UpdateControls, which does all the processing in
one place, and invoke it whenever the state of the form changes?
UpdateControls is less efficient, because it means that all state-dependant
controls are reviewed every time, but it is safer, because it keeps all the
logic in one place.
Is there a better way, or should I just learn to love UpdateControls?