Skip to main content
Version: 4.1

TableLayoutPanel

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Represents a panel that dynamically lays out its contents in a grid composed of rows and columns.

public class TableLayoutPanel : Panel, IExtenderProvider

Constructors

Instance member TableLayoutPanel()

Initializes a new instance of the TableLayoutPanel class.

Instance member TableLayoutPanel(location, size, controls)

Initializes a new instance of the TableLayoutPanel class with the specified initial settings.

NameTypeDescription
locationPointThe location of the panel on its parent control.
sizeSizeThe size of the panel.
controlsControl[]The array of child controls to add to the panel.

Properties

Instance member ColumnCount

Int32: Returns or sets the number of columns in the table. (Default: 0)

Instance member ColumnStyles

TableLayoutColumnStyleCollection: Returns a collection of column styles for the TableLayoutPanel.

Instance member Controls

TableLayoutControlCollection: Returns the collection of controls contained within the TableLayoutPanel.

Instance member GrowStyle

TableLayoutPanelGrowStyle: Returns or sets whether the TableLayoutPanel control should expand to accommodate new cells when all existing cells are occupied. (Default: AddRows)

Instance member LayoutEngine

LayoutEngine: Returns the control's layout engine.

Instance member RowCount

Int32: Returns or sets the number of rows in the table. (Default: 0)

Instance member RowStyles

TableLayoutRowStyleCollection: Returns a collection of row styles for the TableLayoutPanel.

Methods

Instance member GetCellPosition(control)

Returns the TableLayoutPanelCellPosition that represents the row and the column of the cell.

ParameterTypeDescription
controlControlA control contained within a cell.

Returns: TableLayoutPanelCellPosition. A TableLayoutPanelCellPosition that represents the cell position.

Instance member GetColumn(control)

Returns the column position of the specified child control.

ParameterTypeDescription
controlControlA child control of the TableLayoutPanel.

Returns: Int32. The column position of the specified child control, or -1 if the position of control is determined by LayoutEngine.

Throws:

Instance member GetColumnSpan(control)

Returns the number of columns spanned by the specified child control.

ParameterTypeDescription
controlControlA child control of the TableLayoutPanel.

Returns: Int32. The number of columns spanned by the child control. The default is 1.

Instance member GetControlFromPosition(column, row)

Returns the child control occupying the specified position.

ParameterTypeDescription
columnInt32The column position of the control to retrieve.
rowInt32The row position of the control to retrieve.

Returns: Control. 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 Visible property set to false.

Throws:

Instance member GetPositionFromControl(control)

Returns the TableLayoutPanelCellPosition that represents the row and the column of the cell that contains the control.

ParameterTypeDescription
controlControlA control contained within a cell.

Returns: TableLayoutPanelCellPosition. A TableLayoutPanelCellPosition that represents the cell position.

Instance member GetRow(control)

Returns the row position of the specified child control.

ParameterTypeDescription
controlControlA child control of the TableLayoutPanel.

Returns: Int32. The row position of control , or -1 if the position of control is determined by LayoutEngine.

Throws:

Instance member GetRowHeights()

Returns an array representing the heights, in pixels, of the rows in the TableLayoutPanel.

Returns: Int32[]. An array of type Int32 that contains the heights, in pixels, of the rows in the TableLayoutPanel.

Instance member GetRowSpan(control)

Returns the number of rows spanned by the specified child control.

ParameterTypeDescription
controlControlA child control of the TableLayoutPanel.

Returns: Int32. The number of rows spanned by the child control. The default is 1.

Protected member ScaleControl(factor, specified)

Scales a control's location, size, padding and margin.

ParameterTypeDescription
factorSizeFThe factor by which the height and width of the control will be scaled.
specifiedBoundsSpecifiedA BoundsSpecified value that specifies the bounds of the control to use when defining its size and position.

Instance member SetCellPosition(control, position)

Sets the TableLayoutPanelCellPosition that represents the row and the column of the cell.

ParameterTypeDescription
controlControlA control contained within a cell.
positionTableLayoutPanelCellPositionA TableLayoutPanelCellPosition that represents the row and the column of the cell.

Instance member SetColumn(control, column)

Sets the column position of the specified child control.

ParameterTypeDescription
controlControlThe control to move to another column.
columnInt32The column to which control will be moved.

Instance member SetColumnSpan(control, value)

Sets the number of columns spanned by the child control.

ParameterTypeDescription
controlControlA child control of the TableLayoutPanel.
valueInt32The number of columns to span.

Throws:

Instance member SetRow(control, row)

Sets the row position of the specified child control.

ParameterTypeDescription
controlControlThe control to move to another row.
rowInt32The row to which control will be moved.

Instance member SetRowSpan(control, value)

Sets the number of rows spanned by the child control.

ParameterTypeDescription
controlControlA child control of the TableLayoutPanel.
valueInt32The number of rows to span.

Throws:

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IImageProvides access to common image properties across the controls that implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.