Inserts a new group into the control.

Syntax

rv = Send_Message(Ctrl, "OLE.InsertGroup", Group, Caption)

Parameters

ParameterDescription
GroupIndex specifying the insertion point
CaptionThe new group's caption

Remarks

The InsertGroup method inserts a new group at the given location. The Group parameter is the index of the new group. If you pass an index to an existing group, then the group is inserted before that one. If Group is -1 or specifies an index beyond the current number of groups, then the new group is added at the bottom. The Caption parameter is the new group's caption. Use any of the Group properties after this call to modify the group as needed.

The new group will have no items. Use the InsertItem method or the GroupItemCount property to add items to it.

Example

// Insert a new group at the beginning and make is special 
Send_Message(@Window:".OLE_SHORTCUTBAR", "OLE.InsertGroup", 1, "My New Special Group") 
Set_Property(@Window:".OLE_SHORTCUTBAR", "OLE.GroupSpecial[1]", 1)

See Also

RemoveGroupInsertItemClearGroupClear

  • No labels