enabling controls on a form

I have a form with a split container with 2 panels each holding 20 text boxes. I've tried using a for each statement with a if GetType is text box then enable = true etc... to enable these text boxes and when that didn't work I tested this :

mol4.Enabled =True

mol5.Enabled =True

Where mol4 and mol5 are two different tb's. It didn't enable them. I've never run into this problem before. Any thoughts?

[578 byte] By [etcheverrjc] at [2007-12-24]
# 1

Also despite everything being enabled initially everything shows up disabled when i debug.

etcheverrjc at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2

The state of the container control will override the state of it's children (i.e. if your panel is disabled then all textboxes in the panel will be disabled, regardless of the individual textbox's enabled flag state).

So, rather than enabling/disabling 20 individual textboxes, just set the panel's enabled flag to true or false and leave all of your textboxes set to enabled.

Richard_Wolf at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...