InsertButton Method (AToolBar)

Inserts a button object into the object and returns a reference to the created object.

Syntax

[ ppButton = ] Object.InsertButton ( [vKey] )

The InsertButton method syntax has the following parts:

 

Name

Type

Description

Object

AToolBar

AToolBar control

vKey

Val Variant

An integer specifying the index of the currently selected item in the object.

ppButton

AToolBarButton

A specific button of the AToolBar object either by position or by key.

Comments

Creates an AToolBarPane object and inserts the newly created object before the specified button. If vKey is omitted or out-of-range the newly created button will be added to the end of the buttons collection.

Example

The following example will insert a button before the existing "FileSave" button:

tbrbOpen=tbr1.InsertButton("FileSave")

Applies to

AToolBar

See Also

Clear, MoveButton, RemoveButton