How do i remove the space occupied by the control that is hidden(visibility = false) [Resolved]

Posted by Mahe under C# on 8/21/2012 | Points: 10 | Views : 3616 | Status : [Member] | Replies : 2
Hi All,

How do i remove the space occupied by the control that is hidden(visibility = false)

Thanks & Regards,
Mahe




Responses

Posted by: Mahe on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
Hi All,

It can be achieve by using display property and set it to none. ie display = "none"

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gopesh9 on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
You cannot remove the space occupied by the control that is hidden. If you really want to use that space then create that control at the runtime i.e.
Button b1 = new Button();

b1.Text = "Click Me";
Panel1.Controls.Add(b1);


G. S.
.Net Developer

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response