TableLayoutPanel

A tablelayoutpanel can be used as a placeholder for other controls
This type of control is often used when you need to construct a complicated user interface where you need to create dynamic layouts


Columns collection
Rows collection


You can easily add and define one at design-time
You can add controls at runtime by using the Add method


ColumnsStyle and RowsStyle properties are used to specify the number of columns and rows


tbpTableLayoutPanel.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; 
tbpTableLayoutPanel.RowCount = 1
tbpTableLayoutPanel.ColumnCount = 2
tbpTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(SizeType.AutoSize);
tbpTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.RowStyle(SizeType.Percent,50F);
tbpTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.RowStyle(SizeType.Percent,50F);
tbpTableLayoutPanel.Controls.Add(opicturebox, 0, 0);
tbpTableLayoutPanel.Controls.Add(olabel, 1, 0);

tbpTableLayoutPanle.GetControlFromPosition 



© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext