

| Type | Description | |||
| Caption as String | A string expression that indicates the group's caption. The Caption supports built-in HTML format as described here, if the CaptionFormat property is exHTML. |
| Return | Description | |||
| Group | A Group object being added to Groups collection. |
The following VB sample adds two groups and two items to each group:
With ExplorerBar1
.BeginUpdate
With .Groups
With .Add("Group 1")
.AddItem "Item 1"
.AddItem "Item 2"
End With
With .Add("Group 2")
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
.EndUpdate
End WithThe following C++ sample adds two groups and two items to each group:
#include "Item.h" #include "Group.h" #include "Groups.h" COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; m_explorerbar.BeginUpdate(); CGroups groups = m_explorerbar.GetGroups(); CGroup group1 = groups.Add( "Group 1" ); group1.AddItem( "Item 1", vtMissing ); group1.AddItem( "Item 2", vtMissing ); CGroup group2 = groups.Add( "Group 2" ); group2.AddItem( "Item 1", vtMissing ); group2.AddItem( "Item 2", vtMissing ); m_explorerbar.EndUpdate();
The following VB.NET sample adds two groups and two items to each group:
With AxExplorerBar1
.BeginUpdate()
With .Groups
With .Add("Group 1")
.AddItem("Item 1")
.AddItem("Item 2")
End With
With .Add("Group 2")
.AddItem("Item 1")
.AddItem("Item 2")
End With
End With
.EndUpdate()
End WithThe following C# sample adds two groups and two items to each group:
axExplorerBar1.BeginUpdate();
EXPLORERBARLib.Group group1 = axExplorerBar1.Groups.Add("Group 1");
group1.AddItem("Item 1", null);
group1.AddItem("Item 2", null);
EXPLORERBARLib.Group group2 = axExplorerBar1.Groups.Add("Group 2");
group2.AddItem("Item 1", null);
group2.AddItem("Item 2", null);
axExplorerBar1.EndUpdate();The following VFP sample adds two groups and two items to each group:
With thisform.ExplorerBar1
.BeginUpdate()
With .Groups
With .Add("Group 1")
.AddItem("Item 1")
.AddItem("Item 2")
EndWith
With .Add("Group 2")
.AddItem("Item 1")
.AddItem("Item 2")
EndWith
EndWith
.EndUpdate()
EndWith