views:

63

answers:

2

Is there anything similar to Java Swing's GridBagLayout on .NET and Winforms?

+2  A: 

TableLayoutPanel.

Hans Passant
+2  A: 

You can do some of what GridBagLayout does with the TableLayoutPanel. E.g. you can place controls at specified rows and columns using SetRow and SetColumn, and have them span using SetRowSpan and SetColumnSpan; you can control sizing and weighting using the RowStyles and ColumnStyles collection, etc. Whether it supports every feature of GridBagLayout I don't know, but it's probably the closest thing that's built into WinForms.

itowlson