You almost certainly don't need any code at all. Follow the CodeBank link in my signature below and check out my thread on the Anchor & Dock properties. It looks to me like what you should be doing is first designing a user control to represent a single player. That user control would contain a TableLayoutPanel that would contain the six GroupBoxes and then the other controls below that. You would set the Dock and Anchor properties of those child controls so that one player would resize as desired. On your form you would then add another TableLayoutPanel and add eight instances of your user control to it and then set the Dock and Anchor properties of those appropriately. Everything will then happen automatically, with no code required from you.
Thanks for this, I done as you said and works well
The only issue I have is the + - buttons not resizing, I have them left and right Anchored, they just spread out not resize (proportionately)
Apart from that looks great
Thanks for this, I done as you said and works well
The only issue I have is the + - buttons not resizing, I have them left and right Anchored, they just spread out not resize (proportionately)
Apart from that looks great
Thankyou
Andrew
Sounds like a job for a TableLayoutPanel again. Each TLP would have one row and two columns of 50% width each. You'd then set Dock to Fill for each Button. The TLP would be Anchored to all sides of its parent GroupBox. As the GroupBox grew and shrank, so would the TLP and so would the Buttons.
You almost certainly don't need any code at all. Follow the CodeBank link in my signature below and check out my thread on the Anchor & Dock properties. .
Thanks You, but I think you need to update the code as follows
Code:
Label1.Anchor = AnchorStyles.Top Or AnchorStyles.Left