Type | Description | |||
Position as Long | A long expression that indicates the position of the requested group | |||
Group | A Group object being accessed by its position. |
Use the ItemByPos property to access the Group object by its position. Use the Position property to specify the group's position. Use the Caption property to get the group's caption. Use the Item property to access a given Group object. Use the Count property to count the groups in the control.
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