1
Answer

Newbie: How do I use Container to hide all Controls ?

Administrator

Administrator

21y
2k
1
Hello, I notice that my Windows Applications have a private variable System.ComponentModel.Container components I had assumed that all my Controls (buttons, textBoxes) would be .Added to this Container. but i don't see it in the generated code. It does not seem that Controls are ever added to it. I was hoping to iterate through components to perfom a hid of all my controls, something like:- foreach(Component TheComponent in components.Components) { TheComponet.hide() } but the components container is still always null, and Component does not expose any .hide method anyway. So what use is the container object to me ? Can anyone suggest how I can easily iterate through all my Controls Many Thanks Julias
Answers (1)