Bill

Bill

  • NA
  • 16
  • 0

Docking/Anchoring controls

Jul 11 2008 1:18 PM
I have a user control (which for the purposes of this post is just a container), and several nested user controls. I want to lay out the child controls inside the container in a similar way to the following picture:

http://mi6.nu/docking.jpg

I've tried different combinations of Anchor and Dock properties as well as using a Flow Layout Panel, but I can't get it to work.

The two things I know are:
1) The location of each child control on the Y-axis
2) The height of the control

I need some way to assign these controls a combination of properties and have them stack up as shown in the picture.  Full width child controls should float to the left, and if there's more than one child control at a Y location (eg: 3 and 4), the available space should be split.

I managed to get it sort of working, but items were overlapping.

Answers (2)