Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

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

Apr 4 2003 3:26 PM
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)