rik
rik

Reputation: 1299

Resizing a panel c# win forms

If you imagine a win form with a line drawn vertically down the middle. On the left i have a graph, and when you click the graph certain forms open on the right in an mdi type panel.

I am trying to figure out how to logically get this to look like a proper application should but am failing!

The whole form loads in a maximised view. I first set the panel width to 0 then when i add a form i check if the panels width is less than the forms, if it is then change the panels width to that of the forms.

This doesn't look great tho tbh, resizing makes strange things happen and i see a lot of grey. Does anyone have any ideas?

Upvotes: 1

Views: 1676

Answers (1)

slippyr4
slippyr4

Reputation: 862

Use a SplitContainer on your main form. Ensure it's Dock property is set to Fill

Put your graph stuff on the left panel, and your other stuff on the right side.

Upvotes: 1

Related Questions