Share via


Hide Groupbox in c#

Question

Tuesday, January 8, 2013 12:37 PM

hi all,

How can i Hide and Show more than 2 Groupbox in c# 2010?

Thanks,

Sreenath

All replies (6)

Tuesday, January 8, 2013 1:58 PM âś…Answered | 1 vote

Hi Sreenath.

Try this:

GroupBox groupbox = new Groupbox();
groupbox.Visibility = System.Visibility.Hidden;

You could then create your other Groupbox and do the same.

Regards James


Tuesday, January 8, 2013 1:00 PM

Hi,

Can you please clarify your question? The only limits on the number of groupboxes is the one imposed by system constraints. You can have any number of controls on a given form.

Toni Petrina
My blog: Toni codes .NET
If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful"


Tuesday, January 8, 2013 1:55 PM

Try

groupBox1.Visible = false/True;

With Thanks and Regards
Sambath Raj.C
click &quotProposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you
Happy Programming!


Tuesday, January 8, 2013 5:33 PM

A Panel and a GroupBox do all the same things. A Panel doesn't have a border, and GroupBox does. If you don't want the border than you can use panel.I think you must use panel if the above code doesn't work.


Wednesday, January 9, 2013 5:37 AM

HI Thomo03,

 thanks dude .. its work...


Friday, January 11, 2013 10:20 PM

Hi SivaSree.

Could you mark this as the answer if it worked for you, I know it's sad, but it's the first answer I have ever given! I'm glad it helped you.

James