O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a table layout that can dynamicallyadd or remove rows based on the size of the collection

TableLayoutPanel is to Windows Forms as the table tag is to HTML. It is used to present elements in the UI in a tabular format. It is more flexible than other layouts as it provides good options to set up the rows and columns. For example, if one of the rows has control that needs two columns instead of one, you can use the ColumnSpan property to make the control span two columns. However, the ease of use exposed by the panel at design time is not evident when you try to do the same at runtime. A good example is adding rows. To add them at design time is easy. But when you want to do so at runtime, you will need to know various steps that result ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required