Luigi04
Luigi04

Reputation: 457

Grouping multiple winforms components

I am developing an application which reads data from a COM-Port and shows it in four different graphs. For each graph there should be additional data shown above. Normally all four graphs are shown together in one form but the user should also be able to maximize each graph and the data above so that one graph fills the whole form.

My question now is how to best pack the components together (two panels, one tablelayoutpanel and one cartesian chart). The main form is supposed to be resizable and the components should adjust to the size of the main form. What would be the best way to handle this? Should I put the components in four panels or group boxes or is there a better approach?

Thank you!

enter image description here

Upvotes: 0

Views: 697

Answers (1)

Kempeth
Kempeth

Reputation: 1948

That combination of chart, 2 panels and a TableLayoutPanel is a good candidate for creating a UserControl.

Assuming you want the four groups to be equal in size regardless of the resizing of the parent window, I'd put them all into a 2x2 TableLayoutPanel and when a group is maximized you should be able to hide the others and set the width and height of the other row and column to zero instead of 50%.

Upvotes: 1

Related Questions