GWToolbarItems

Enumerates the items on a toolbar.

Properties

The following table lists the properties for this class, along with access and descriptions.

Property

Access

Description

Count

R/O

Long.

_NewEnum

R/O

Enumeration object. Implements IEnumVARIANT. For Windows only.

Methods

GWToolbarItem Add( String Caption, GWCommand item [Variant AddBefore] )
  • AddBefore refers to the index (ordinal) into the collection.
GWToolbarItem Item( Variant item )
  • Returns GWToolbarItem. The item parameter refers to an index (ordinal).
GWToolbarItem FindByID( Variant ID )
  • Returns the GWToolbarItem object with the command ID assigned to a toolbar button (Number). This method can be used by a C3PO to override the behavior of other C3PO commands. That is, a GWCommand object can be obtained, aggregated with a new GWCommand object, and the result assigned back to the GWToolbarItem.GWCommand property. Items on the menu that were not constructed by the C3PO return NULL.

Remarks

While a toolbar is being loaded, the client calls CommandBlock::CreateCommandAggregate and invokes GWToolbarItems::Add.

Unlike menus, the Item and AddBefore parameters allow you to specify a persistent ID.