W
Wesam
Hi all,
I got a problem: I have a Panel control which has many mixed child controls
(buttons, checkboxes, comoboxes). All controls are visible (the parent
container Panel is also visible). My problem is that when I set the Visible
property of the Panel to false and try to read the Visible property of any
of its child control, the result is always false??? How can I get the
original value of the Visible property of any child control??
I'd appreciate your prompt reply,
Thanks a lot ..
Veszko
/****************************/
Panel pnl = new Panel();
..
..
..
pnl.Visible = true;
Button btn = new Button();
..
..
..
btn.Visible = true;
pnl.Controls.Add(btn);
..
..
..
MessageBox.Show(pnl.Visible.ToString()); // The result is "True"
MessageBox.Show(btn.Visible.ToString()); // The result is "True"
pnl.Visible = false;
MessageBox.Show(pnl.Visible.ToString()); // The result is "False"
MessageBox.Show(btn.Visible.ToString()); // The result is "False" ...
which is not OK!!!
// I need to know the original value of "btn.Visible"
/****************************/
I got a problem: I have a Panel control which has many mixed child controls
(buttons, checkboxes, comoboxes). All controls are visible (the parent
container Panel is also visible). My problem is that when I set the Visible
property of the Panel to false and try to read the Visible property of any
of its child control, the result is always false??? How can I get the
original value of the Visible property of any child control??
I'd appreciate your prompt reply,
Thanks a lot ..
Veszko
/****************************/
Panel pnl = new Panel();
..
..
..
pnl.Visible = true;
Button btn = new Button();
..
..
..
btn.Visible = true;
pnl.Controls.Add(btn);
..
..
..
MessageBox.Show(pnl.Visible.ToString()); // The result is "True"
MessageBox.Show(btn.Visible.ToString()); // The result is "True"
pnl.Visible = false;
MessageBox.Show(pnl.Visible.ToString()); // The result is "False"
MessageBox.Show(btn.Visible.ToString()); // The result is "False" ...
which is not OK!!!
// I need to know the original value of "btn.Visible"
/****************************/