-2

I'm creating an Inventory system and I want to have different modules like Stocks Reports and Stocks Info in just a single form. Is it possible? Can groupbox allow this to happen? Thank you so much. Feel free to suggest and comment and please be nice. thanks again

Jonald Samilo
  • 297
  • 1
  • 2
  • 11
  • 1
    Yes you can *hide textboxes and labels inside a groupbox*. Your Heading and content mismatch, Please be more clear then only you will get better response – sujith karivelil Aug 12 '16 at 03:52
  • 1
    For different modules, I suggest using `TabControl` where one `TabPage` is responsible for one module. – Fabio Aug 12 '16 at 03:54

1 Answers1

2

As I've understood, you actually want to work with two different blocks in your single form. Then, you can simply create two GroupBoxes - groupBoxReports and groupBoxInfo.
Then, you can drop all elements on your group boxes, so that group boxes contain these elements.
Now, you can simply hide group boxes instead of manipulating with every element within it:

public void showInfoButton_Click(object sender, EventArgs e) 
{
    groupBoxReports.Visible = false;
    groupBoxInfo.Visible = true;
}

All elements within a group box are hidden as well.

As mentionted in comments, you may want to work with TabControl instead of GroupBox, because it is exactly what it is designed for.

Yeldar Kurmangaliyev
  • 33,467
  • 12
  • 59
  • 101