property Group.Count as Long
Gets the count of the items.

TypeDescription
Long A long expression that indicates the count of items in the group.

The Count property counts the items in the group. Use the Item property to access an item giving its index or by its caption. Use the ItemByPos property to get the item giving its position. Use the ItemHeight property to specify the height for all items in the group. Use the Caption property to specify the caption of the item. Use the Visible property to specify whether an item is visible or hidden.

The following VB sample enumerates the items in the group:

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

The following VB sample enumerates the items in the group, as they are displayed:

With ExplorerBar1.Groups(0)
    Dim i As Long
    For i = 0 To .Count - 1
        Dim it As EXPLORERBARLibCtl.Item
        Set it = .ItemByPos(i)
        If it.Visible Then
            Debug.Print it.Caption
        End If
    Next
End With

The following C++ sample enumerates the items in the group:

CGroup group = m_explorerbar.GetGroups().GetItem( COleVariant( long(0) ) );
for ( long i = 0; i < group.GetCount(); i++ )
{
	CItem item = group.GetItem( COleVariant( long(i) ) );
	OutputDebugString( item.GetCaption() );
}

The following C++ sample enumerates the items in the group, as they are displayed:

CGroup group = m_explorerbar.GetGroups().GetItem( COleVariant( long(0) ) );
for ( long i = 0; i < group.GetCount(); i++ )
{
	CItem item = group.GetItemByPos( i );
	if ( item.GetVisible() )
		OutputDebugString( item.GetCaption() );
}

The following VB.NET sample enumerates the items in the group:

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

The following VB.NET sample enumerates the items in the group, as they are displayed:

With AxExplorerBar1.Groups(0)
    Dim i As Long
    For i = 0 To .Count - 1
        Dim it As EXPLORERBARLib.Item = .ItemByPos(i)
        If it.Visible Then
            Debug.WriteLine(it.Caption)
        End If
    Next
End With

The following C# sample enumerates the items in the group:

EXPLORERBARLib.Group group = axExplorerBar1.Groups[0];
for (int i = 0; i < group.Count; i++)
	System.Diagnostics.Debug.WriteLine(group[i].Caption);

The following C# sample enumerates the items in the group, as they are displayed:

EXPLORERBARLib.Group group = axExplorerBar1.Groups[0];
for (int i = 0; i < group.Count; i++)
{
	EXPLORERBARLib.Item item = group.get_ItemByPos(i);
	if ( item.Visible ) 
		System.Diagnostics.Debug.WriteLine(item.Caption);
}

The following VFP sample enumerates the items in the group:

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

The following VFP sample enumerates the items in the group, as they are displayed:

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