property Group.ItemByPos (Position as Long) as Item
Gets the item given its position.

TypeDescription
Position as Long A long expression that indicates the item's position.
Item An Item object being accessed.
Use the ItemByPos property to access the items in the group by position. The Position property is 0 based. The Count property counts the items in the group. 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, as they are displayed:

With ListBar1.Groups(0)
    Dim i As Long
    For i = 0 To .Count - 1
        Dim it As EXLISTBARLibCtl.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, as they are displayed:

CGroup group = m_listbar.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, as they are displayed:

With AxListBar1.Groups(0)
    Dim i As Long
    For i = 0 To .Count - 1
        Dim it As EXLISTBARLib.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, as they are displayed:

EXLISTBARLib.Group group = axListBar1.Groups[0];
for (int i = 0; i < group.Count; i++)
{
	EXLISTBARLib.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, as they are displayed:

With thisform.ListBar1.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