Version

Insert Method (CheckItems)

Inserts a button into this group before the specified index.
Syntax
'Declaration
 
Public Sub Insert( _
   ByVal index As Integer, _
   ByVal btn As TBarButton _
) 
public void Insert( 
   int index,
   TBarButton btn
)

Parameters

index
Zero-based position at which to insert the button at.
btn
The button to be inserted.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionThrown when index is less than 0, or exceeds the Count of items within this collection.
Remarks

Developers are encouraged to use Add(TBarButton) when adding items to the end of a group; this method supports inserting buttons before any given zero-based position within the group. Following a call to this method, btn will exist in the collection referenceable at index index, and all other Toolbar items following it will have their indices incremented by one.

Since changes in the membership of the collection can affect index-oriented referencing schemes in an application, developers are encouraged to assign items they wish to locate a Key value, and use the FromKeyButton method.

Thrown when index is less than 0, or exceeds the Count of items within this collection.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also