How would I setup my controls for the following situation?:
I have a parent-container for example a GroupBox.
Inside this parent-container I have two similar controls, like for example ListBoxes, next to each other. They both have the same size, so the border between the two of them is exactly in the middle of the GroupBox.
Now when the GroupBox is resized, I want the ListBoxes to also be resized, but the two should always be at the same size than the other one. So also the border between the two of them stays in the middle of the GroupBox.
So, how would I set up the properties for these three controls to achieve my desired behaviours?
You need another container. The TableLayoutPanel is the best solution. Use 1 row and 2 columns and dock (Dock = Fill) it in the group box. The width of both columns should be set to 50%. Next you can add your controls in the individual cells and dock them (Dock = Fill)