This document is archived and information here might be outdated.  Recommended version.


IToolbarControlDefault.MoveItem Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Controls)  

IToolbarControlDefault.MoveItem Method

Moves an item from one index to another.

[Visual Basic .NET]
Public Sub MoveItem ( _
    ByVal startIndex As Integer, _
    [ByVal finalIndex As Integer] _
)
[C#]
public void MoveItem (
    int startIndex,
    int finalIndex
);
[C++]
HRESULT MoveItem(
  long startIndex,
  long finalIndex
);
[C++]

Parameters startIndex [in]
startIndex is a parameter of type long finalIndex [in, optional, defaultvalue()]
finalIndex is a parameter of type long

Product Availability

Available with ArcGIS Engine.

Description

Moves the item at the specified startIndex, to the position at the specified finalIndex. If no finalIndex is supplied the item is moved to the end of the ToolbarControl.

Errors Returned

1023 800a03ff: The specified index is out of range

[C#]
axToolbarControl1.MoveItem(0, axToolbarControl1.Count - 1);
[Visual Basic .NET]
AxToolbarControl1.MoveItem(0, AxToolbarControl1.Count - 1)

See Also

IToolbarControlDefault Interface