I’m using C++ Builder 5. Is there a way to group a disparate set of controls so that by simply calling, for instance, myGroup.Enabled = false; will set all group of controls enabled property to false? I can’t use a GroupBox since the controls (labels, checkboxes, etc) are on different TabPages.
The reason I ask is so I don’t have to call each control’s enabled property explicitly and can do it with one simple call.
If not, how can I create a custom Control class to do this?
You could use the Tag property of the controls and create your own grouping.
Alternatively, If you want to enable/disable all controls in one go.
Examples:
NOTE: The above code has been tested with C++Builder 2007