System.Windows.Forms.TableLayoutPanel.GetRow Method

Returns the row position of the specified child control.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.DefaultValue("-1")]
[System.ComponentModel.DisplayName("Row")]
public int GetRow (Control control)

Parameters

control
A child control of the System.Windows.Forms.TableLayoutPanel.

Returns

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

Remarks

If control spans two or more rows, the TableLayoutPanel.GetRow(Control) 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 TableLayoutPanel.GetRowHeights.

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 control, even when its position is determined by TableLayoutPanel.LayoutEngine, call the TableLayoutPanel.GetPositionFromControl(Control) method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0