Question

I have two controls in a groupbox ("Waveforms"). I would like them to dynamically resize also by height but can't get it to work. I've used left|top|right anchor for 1st control ("Left channel") and left|bottom|right anchor for 2nd ("Right channel").

Here is a short video of problem.

How can I acomplish this?

Was it helpful?

Solution

If you want your controls to share vertical space of the GroupBox, you can use a TableLayoutPanel or a SplitContainer.

By using a TableLayoutPanel you can easily specify how the vertical space should be shared by controls. For example you can add two rows to the TableLayoutPanel and give them each 50% of the whole height.

By using a SplitContainer, the user can change the occupied heights of the controls at runtime.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top