Position: Integer;
Position: integer;
The Position property determines column position.
By default the number of position equals to the index of the current column (ITreeListColumn.Index).
The number of position must be not less than 0, and not greater than ITreeListColumns.Count.
Executing the example requires a form containing the Button component with the Button1 identifier and the TreeList component with the TreeList1 identifier. At least two columns must be added to the TreeList1 component. This example is a handler of the OnClick event for the Button1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
TreeList1.Columns.Item(0).Position := 1;
End Sub Button1OnClick;
After executing the example the first and the second table columns exchange their positions.
Executing the example requires a form containing the Button component with the button1 identifier and the TreeListNet component with the treeListNet1 identifier. At least two columns must be added to the treeListNet1 component. Example is a handler of the Click event for the button1 component.
Imports Prognoz.Platform.Interop.Forms;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
treeListNet1.CtrlBox.Columns.Item[0].Position := 1;
End Sub;
The result of Fore.NET Example execution matches with that in the Fore Example.
See also: