Let's say we have form with docked GroupBox. GroupBox have docked TableLayoutPanel with 2 rows (50% height each). Each row have Button. I want this buttons to be centered in TableLayoutPanel cells, expanding with form but also have a maximum width.
Example form:
If I use anchor(left,right) or dock(fill) and then set maximum width for buttons, they stay on left side of cells. Is there a way to do what I want (have button in center when reached max width) using only designer?
turn OFF all anchors for each button to keep it in the center of the parent container without changing their size
OR
But you cannot achieve limiting the button size together with centering. You can do it only dynamically, through code.