Skip to main content
Version: 3.5

TableLayoutPanel

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.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 memberTableLayoutPanel()

Initializes a new instance of the TableLayoutPanel class.

Instance memberTableLayoutPanel(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 memberColumnCount

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

Instance memberColumnStyles

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

Instance memberControls

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

Instance memberGrowStyle

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

Instance memberLayoutEngine

LayoutEngine: Returns the control's layout engine.

Instance memberRowCount

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

Instance memberRowStyles

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

Methods

Instance memberGetCellPosition(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 memberGetColumn(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 memberGetColumnSpan(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 memberGetControlFromPosition(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 memberGetPositionFromControl(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 memberGetRow(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 memberGetRowHeights()

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 memberGetRowSpan(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.

Instance memberSetCellPosition(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 memberSetColumn(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 memberSetColumnSpan(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 memberSetRow(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 memberSetRowSpan(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
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.