We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Grouping Objects

bozo7
bozo7 asked
on
Medium Priority
168 Views
Last Modified: 2013-11-23
I am wondering if there is a way to group a bunch of objects, like labels or edit boxes, so that i can set them visible false or true in one statement not a whole bunch of statements. Please Help
Comment
Watch Question

Commented:
Well, I really doubt you can hide all of them with just one statement, however, you can make a TList of these objects, and set the properties in a FOR loop.

Commented:
what you can do is make a descendant of a panel (or any other group component) which when set to invisible, automatically makes all his components invisible? What about it?

Commented:
bozo7,

 come to think of it, panel already supports this offcourse! What a stupid comment I've put above...
 Put all the components in a panel and than make panel invisible. Otherwise if the components are scattered all over a form and can't be put in one panel... make a descendant of TList... (like matvey proposes)

Zif.

Author

Commented:
I should have clarified.
I also want to enable or disable a group of objects and have the glyphs on the buttons be the disabled glyph not the enabled glyph. When I use a toolbar or panel for this the buttons are disabled but don't show the disabled glyphs.
ZifNab I am rejecting your answer not because it is wrong but because my question was not clear. Sorry
bozo
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
I had to move the SetControlsVisible and SetcontrolsEnabled to the Public section. Otherwise does exaclty what I was looking for.

I really enjoy this exchange of info

bozo
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.