Type | Description |
The following VB sample adds a group and two items:
With ListBar1 .BeginUpdate With .Groups.Add("Group 1") .AddItem "Item 1" .AddItem "Item 2" End With .EndUpdate End With
The following C++ sample adds a group and two items:
#include "Item.h" #include "Group.h" #include "Groups.h" m_listbar.BeginUpdate(); COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; CGroups groups = m_listbar.GetGroups(); CGroup group = groups.Add("Group 1"); group.AddItem( "Item 1", vtMissing ); group.AddItem( "Item 2", vtMissing ); m_listbar.EndUpdate();
The following VB.NET sample adds a group and two items:
With AxListBar1 .BeginUpdate() With .Groups.Add("Group 1") .AddItem("Item 1") .AddItem("Item 2") End With .EndUpdate() End With
The following C# sample adds a group and two items:
axListBar1.BeginUpdate(); EXLISTBARLib.Group group = axListBar1.Groups.Add("Group 1"); group.AddItem("Item 1", null); group.AddItem("Item 2", null); axListBar1.EndUpdate();
The following VFP sample adds a group and two items:
With thisform.ListBar1 .BeginUpdate() With .Groups.Add("Group 1") .AddItem("Item 1") .AddItem("Item 2") EndWith .EndUpdate() EndWith