Reputation: 701
I have a winform which can be resized. I have 4 chart control in the form and sit side by side. When the form is in maximum size, the layout of each chart control is run out. I try to set the anchor style but I got no luck. How I can make each control equally use the form width?
Normal size winform. The chart control sits side by side.
Maximum size form, the chart control is not in equal size and not sit side by side
How can I set the Anchor and make each control in the right position?
Upvotes: 0
Views: 1865
Reputation: 8654
That's what a SplitContainer
is for.
It has two panels splitted horizontally or vertically (property Orientation
)
The user has then the ability to resize both panels.
Insert a SplitContainer and dock it fully in the parent form. (Dock = DockStyle.Fill
)
Insert another two SplitContainers in each panel of the top SplitContianer.
Place your charts into the child SplitContainers.
You will find many examples in the web...
Upvotes: 6