Move(IndexFrom: Integer; IndexTo: Integer);
IndexFrom - index of the name that must be moved.
IndexTo - index of the position, to which the name must be moved.
The Move method moves name in the collection.
Executing the example requires a form with the Button1 button on this form, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Eax: IEaxAnalyzer;
Pivot: IPivot;
PivotDim: IPivotDimension;
NamS: IPivotDimNamings;
Begin
Eax := UiErAnalyzer1.ErAnalyzer;
Pivot := Eax.Pivot;
PivotDim := Pivot.Dimensions.Item(0);
NamS := PivotDim.Namings;
NamS.Add;
Nams.Move(0, 1);
End Sub Button1OnClick;
After executing the example, two first elements of the names collection are switched.
See also: