Visual Basic: Windows Controls

Visual Studio 6.0

Add Method (ButtonMenus Collection)

See Also    Example    Applies To

Adds a ButtonMenu object to the ButtonMenus collection and returns a reference to the newly created object.

Syntax

object.Add (index, key, text)

The Add method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
index Optional. An integer specifying the position where you want to insert the object. If no index is specified, the object is added to the end of the collection.
key Optional. A unique string that identifies the object. Use this value to retrieve a specific object in the collection.
text Required. The string that will appear in the menu.

Remarks

To see ButtonMenu objects, you must set the Button object's Style property to tbrDropDown.

To detect when the user has clicked a ButtonMenu object, use the ButtonMenuClick event of the Toolbar control.

Show: