Amicable
Amicable

Reputation: 3091

What controls this positioning setting?

I have two group boxes, containing list boxes, next to each other on a User Control page.

As far as I can see both the groupboxes and listboxes have the same properties. (Top, Left, Right anchors, no docking & autosize disabled.) but they appear differently my build application to they do in visual studio.

Also, when you adjust the window size the "Footers" group box increases in size but the "Predefined Message" group boxes remains fixed.

Comparative Screenshot Top VS2010, bottom debug view

I haven't done a great deal of work with GUIs, something must be set differently, but what!

Thanks

Upvotes: 0

Views: 112

Answers (1)

Steve
Steve

Reputation: 216303

Your Predefined message GroupBox has Anchor=Right and so when you resize the form, it will expand to the right, but your Footers Group box is Anchor=Left, so it doesn't move from its left position.
The result is that your Predefined GroupBox expands to the right but under the Footer GroupBox.

Remove the Anchor=Right to the Predefined message or the Anchor=Left to the Footer GroupBox

The Anchor and Dock properties are really powerfull, but you need a bit of practice to understand how they work.

Upvotes: 2

Related Questions