System.Windows.Forms 2.0.0.0 System.Windows.Forms.Panel System.ComponentModel.IExtenderProvider The control arranges its contents in a grid. Because the layout is performed both at design time and run time, it can change dynamically as the application environment changes. This gives the controls in the panel the ability to proportionally resize, so it can respond to changes such as the parent control resizing or text length changing due to localization. Any Windows Forms control can be a child of the control, including other instances of . This allows you to construct sophisticated layouts that adapt to changes at runtime. The control can expand to accommodate new controls when they are added, depending on the value of the , , and properties. Setting either the or property to a value of 0 specifies that the will be unbound in the corresponding direction. You can also control the direction of expansion (horizontal or vertical) after the control is full of child controls. By default, the control expands downward by adding rows. If you want rows and columns that behave differently from the default behavior, you can control the properties of rows and columns by using the and properties. You can set the properties of rows or columns individually. The control adds the following properties to its child controls: Cell, Column, Row, ColumnSpan, and RowSpan. You can merge cells in the control by setting the ColumnSpan or RowSpan properties on a child control. To set the Cell, Column, Row, ColumnSpan, and RowSpan properties at run time, use the , , , , and methods. To read the Cell, Column, Row, ColumnSpan, and RowSpan properties at run time, use the , , , , and methods. The docking behavior of child controls is the same as other container controls. The anchoring behavior of child controls in a differs from the behavior in other container controls. If the value of the child control's property is set to or , the control will be placed against the left or right border of the cell, at a distance that is the sum of the control's property and the panel's property. If both the and values are set, the control will be sized to the width of the cell, with the and values taken into account. The behavior for and anchoring is analogous. For more information, see How to: Anchor and Dock Child Controls in a TableLayoutPanel Control. If you need a child control to mimic the default anchoring behavior in other container controls, you can adjust the and properties to maintain a constant distance between the control's border and the cell's border. Setting the values of both the Column and Row properties of a child control to -1 will cause the control to be moved to the first empty cell in the control. The empty cell will be chosen in a search that proceeds from left to right and from top to bottom. This order is dependent on the culture, so it will behave correctly in right-to-left (RTL) layouts. Only controls that have the property set to true participate in the control's layout computations. dl_WlkArrangingControlsUsingTableLayoutPanel Represents a panel that dynamically lays out its contents in a grid composed of rows and columns. Constructor This constructor sets the , , , and properties to their default values. Initializes a new instance of the class. 2.0.0.0 Property System.Windows.Forms.BorderStyle To be added. To be added. Gets or sets the border style for the panel. 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.ComponentModel.Localizable(true) Property 2.0.0.0 System.ComponentModel.DefaultValue(System.Windows.Forms.TableLayoutPanelCellBorderStyle.None) System.ComponentModel.Localizable(true) System.Windows.Forms.TableLayoutPanelCellBorderStyle To be added. Setting this value will cause the panel to redraw itself and its contents. Gets or sets the style of the cell borders. Event 2.0.0.0 System.Windows.Forms.TableLayoutCellPaintEventHandler For more information about handling events, see Consuming Events. Occurs when the cell is redrawn. Property System.Int32 To be added. You can specify both the and the properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the property allows for such growth. If the value of is 0, the panel will grow by adding rows, and if the value of is 0, the panel will grow by adding columns. Specifying panel growth with the property is preferred to setting or to 0, however. Controls can be added or deleted from the table using the property. Gets or sets the number of columns in the table. 2.0.0.0 System.ComponentModel.DefaultValue(0) System.ComponentModel.Localizable(true) Property 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content) System.ComponentModel.MergableProperty(false) System.ComponentModel.DisplayName("Columns") System.ComponentModel.Browsable(false) System.Windows.Forms.TableLayoutColumnStyleCollection To be added. Use the property to access the style properties of specific columns. You can use members of the class to set the characteristics of individual columns in the table. When the control arranges its columns, it assigns priorities to each in the following order: Columns with set to are considered first, and their fixed widths are allocated. Columns with set to are sized to their contents. Remaining space is divided among columns with set to . Gets a collection of column styles for the . Property 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content) System.ComponentModel.Browsable(false) System.Windows.Forms.TableLayoutControlCollection To be added. The property contains all of the controls associated with the table, including controls that may not be currently displayed because of , , or limitations. Gets the collection of controls contained within the . Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) System.Windows.Forms.Control+ControlCollection To be added. Creates a new instance of the control collection for the control. A new instance of assigned to the control. Method 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DisplayName("Cell") System.ComponentModel.DefaultValue(-1) System.Windows.Forms.TableLayoutPanelCellPosition To be added. Gets the that represents the row and the column of the cell. A that represents the cell position. A control contained within a cell. Method 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue(-1) System.ComponentModel.DisplayName("Column") System.Int32 If spans two or more columns, the method will return the lowest column index. The column position value is zero based, so you can use it as an index for the array returned by . This method is called by the Column property, which the panel adds to its child controls at design time. To get the actual position of , even when its position is determined by , call the method. Returns the column position of the specified child control. The column position of the specified child control, or -1 if the position of is determined by . A child control of the . Method 2.0.0.0 System.ComponentModel.DefaultValue(1) System.ComponentModel.DisplayName("ColumnSpan") System.Int32 Column spanning is often useful for positioning a control that is considerably wider than its peers. This method is called by the ColumnSpan property, which the panel adds to its child controls at design time. Returns the number of columns spanned by the specified child control. The number of columns spanned by the child control. The default is 1. A child control of the . Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Int32[] To be added. Returns an array representing the widths, in pixels, of the columns in the . An array of type that contains the widths, in pixels, of the columns in the . Method 2.0.0.0 System.Windows.Forms.Control The column and row position values are zero based. Returns the child control occupying the specified position. The child control occupying the specified cell; otherwise, null if no control exists at the specified column and row, or if the control has its property set to false. The column position of the control to retrieve. The row position of the control to retrieve. Method 2.0.0.0 System.Windows.Forms.TableLayoutPanelCellPosition The method returns the actual current position of , even if its position is determined by the . This method takes into account the entire control state, including column or row spanning and when the has placed a control with its Column and Row properties set to -1. This is equivalent to the situation in which and return -1. Gets the that represents the row and the column of the cell that contains the control. A that represents the cell position. A control contained within a cell. Method 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.DefaultValue("-1") System.ComponentModel.DisplayName("Row") System.Int32 If spans two or more rows, the method will return the lowest row index. The row position value is zero based, so you can use it as an index for the array returned by . This method is called by the Row property, which the panel adds to its child controls at design time. To get the actual position of , even when its position is determined by , call the method. Returns the row position of the specified child control. The row position of , or -1 if the position of is determined by . A child control of the . Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Int32[] To be added. Returns an array representing the heights, in pixels, of the rows in the . An array of type that contains the heights, in pixels, of the rows in the . Method 2.0.0.0 System.ComponentModel.DefaultValue(1) System.ComponentModel.DisplayName("RowSpan") System.Int32 Row spanning is often useful for positioning a control that is considerably taller than its peers. This method is called by the RowSpan property, which the panel adds to its child controls at design time. Returns the number of rows spanned by the specified child control. The number of rows spanned by the child control. The default is 1. A child control of the . Property 2.0.0.0 System.ComponentModel.DefaultValue(System.Windows.Forms.TableLayoutPanelGrowStyle.AddRows) System.Windows.Forms.TableLayoutPanelGrowStyle To be added. By default, the control expands downward by adding rows. If an attempt is made to add a control to a full control, and the value of is , then an is thrown. Gets or sets a value indicating whether the control should expand to accommodate new cells when all existing cells are occupied. Property 2.0.0.0 System.Windows.Forms.Layout.LayoutEngine To be added. To be added. Gets a cached instance of the panel's layout engine. Property 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden) System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Windows.Forms.TableLayoutSettings To be added. To be added. Gets or sets a value representing the table layout settings. Method 2.0.0.0 System.Void To be added. Receives a call when the cell should be refreshed. A that provides data for the event. Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) System.Void Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. Raises the event. A that contains the event data. Method 2.0.0.0 System.Void To be added. Paints the background of the panel. A that contains information about the panel to paint. Property System.Int32 To be added. You can specify both the and the properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the property allows for such growth. If the value of is 0, the panel will grow by adding rows, and if the value of is 0, the panel will grow by adding columns. Specifying panel growth with the property is preferred to setting or to 0, however. Controls can be added or deleted from the table using the property. Gets or sets the number of rows in the table. 2.0.0.0 System.ComponentModel.DefaultValue(0) System.ComponentModel.Localizable(true) Property 2.0.0.0 System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content) System.ComponentModel.MergableProperty(false) System.ComponentModel.DisplayName("Rows") System.ComponentModel.Browsable(false) System.Windows.Forms.TableLayoutRowStyleCollection To be added. Use the property to access the style properties of specific rows. You can use members of the class to set the characteristics of individual rows in the table. When the control arranges its rows, it assigns priorities to each in the following order: Rows with set to are considered first, and their fixed heights are allocated. Rows with set to are sized to their contents. Remaining space is divided among rows with set to . Gets a collection of row styles for the . Method 2.0.0.0 System.Void To be added. Scales a control's location, size, padding and margin. The height and width of the control's bounds. One of the values of that specifies the bounds of the control to use when defining its size and position. Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.Void The method uses the and parameter values to scale both the height and width of the panel independently. Performs the work of scaling the entire panel and any child controls. The ratio by which to scale the control horizontally. The ratio by which to scale the control vertically Method 2.0.0.0 System.Void To be added. Sets the that represents the row and the column of the cell. A control contained within a cell. A that represents the row and the column of the cell. Method 2.0.0.0 System.Void The method moves the control to another column in the . The columns and rows have zero-based indexes. Setting the column position to -1 specifies that the control will flow to the first empty cell. This method reapplies the table layout to all controls in the . This method is called by the Column property, which the panel adds to its child controls at design time. Sets the column position of the specified child control. The control to move to another column. The column to which will be moved. Method 2.0.0.0 System.Void Column spanning is often useful for positioning a control that is considerably wider than its peers. This method is called by the ColumnSpan property, which the panel adds to its child controls at design time. Sets the number of columns spanned by the child control. A child control of the . The number of columns to span. Method 2.0.0.0 System.Void The method moves the control to another row in the control. The columns and rows have zero-based indexes. Setting the row position to -1 specifies that the control will flow to the first empty cell. This method reapplies the table layout to all controls in the . This method is called by the Row property, which the panel adds to its child controls at design time. Sets the row position of the specified child control. The control to move to another row. The row to which will be moved. Method 2.0.0.0 System.Void Row spanning is often useful for positioning a control that is considerably taller than its peers. This method is called by the RowSpan property, which the panel adds to its child controls at design time. Sets the number of rows spanned by the child control. A child control of the . The number of rows to span. Method 2.0.0.0 System.Boolean This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. For a description of this member, see . true if this object can provide extender properties to the specified object; otherwise, false. The to receive the extender properties. System.ComponentModel.Design.Serialization.DesignerSerializer("System.Windows.Forms.Design.TableLayoutPanelCodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") System.ComponentModel.Designer("System.Windows.Forms.Design.TableLayoutPanelDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.Never) System.ComponentModel.DefaultProperty("ColumnCount") System.ComponentModel.ProvideProperty("RowSpan", typeof(System.Windows.Forms.Control)) System.ComponentModel.ProvideProperty("Row", typeof(System.Windows.Forms.Control)) System.ComponentModel.ProvideProperty("ColumnSpan", typeof(System.Windows.Forms.Control)) System.ComponentModel.ProvideProperty("Column", typeof(System.Windows.Forms.Control)) System.ComponentModel.ProvideProperty("CellPosition", typeof(System.Windows.Forms.Control)) System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch) System.Runtime.InteropServices.ComVisible(true)