property Group.Position as Long
Specifies the group's position.

TypeDescription
Long A long expression that indicates the group's position.

Use the Position property to arrange groups. Use the Item property to access the group giving its index or caption. Use the Caption property to get the group's caption. Use the Index property to identify a group. Use the ItemByPos property to access groups by position. The Position property is zero based. For instance, if the Position property is zero, it means first visible group. Use the Visible property to specify whether an item is visible or hidden.

The following VB sample enumerates the groups in the control, as they are displayed:

With ExplorerBar1.Groups
    Dim i As Long
    For i = 0 To .Count - 1
        With .ItemByPos(i)
            Debug.Print (.Caption)
        End With
    Next
End With

The following C++ sample enumerates the groups in the control, as they are displayed:

CGroups groups = m_explorerbar.GetGroups();
for ( long i = 0; i < groups.GetCount(); i++ )
{
	CGroup group( groups.GetItemByPos( i ) );
	OutputDebugString( group.GetCaption() );
}

The following VB.NET sample enumerates the groups in the control, as they are displayed:

With AxExplorerBar1.Groups
    Dim i As Integer
    For i = 0 To .Count - 1
        With .ItemByPos(i)
            Debug.WriteLine(.Caption)
        End With
    Next
End With

The following C# sample enumerates the groups in the control, as they are displayed:

for (int i = 0; i < axExplorerBar1.Groups.Count; i++)
{
	EXPLORERBARLib.Group g = axExplorerBar1.Groups.get_ItemByPos(i);
	System.Diagnostics.Debug.WriteLine(g.Caption);
}

The following VFP sample enumerates the groups in the control, as they are displayed:

With thisform.ExplorerBar1.Groups
    local i
    For i = 0 To .Count - 1
        With .ItemByPos(i)
            wait window nowait .Caption
        EndWith
    Next
EndWith