Buttons Property (AToolBar)

Returns a specific button of the object either by position or by key.

Syntax

[ ppButton = ] Object.Buttons ( vKey )

The Buttons property syntax has the following parts:

 

Name

Type

Description

Object

AToolBar

AToolBar control

vKey

Variant

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

ppButton

AToolBarButton

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

Comments

You can manipulate AToolBarButton objects using standard collection methods (for example, the InsertButton and RemoveButton methods). Each element in the collection can be accessed by its index, the value of the Index property, or by a unique key, the value of the vKey property.

The Buttons collection is a zero-based collection.

Example

The following statement returns the fifth button:

obtbr1.Buttons(4)

Applies to

AToolBar

See Also

ButtonCount, ButtonHeight, ButtonWidth, InsertButton, MoveButton, OnButtonClick, OnButtonDblClick, RemoveButton