Defines the buttons on a toolbar.

Properties

The following tables list the properties and events of the ToolButton class. (No methods are associated with this class.)

Property

Default

Description

baseClassName

TOOLBUTTON

Identifies the object as an instance of the ToolButton class.

bitmap

 

Graphic file (any supported format) or resource reference that contains one or more images that are to appear on the button.

bitmapOffset

0

Specifies the distance, in pixels, from the left of the specified Bitmap to the point at which your button graphic begins. This property is only needed when you specify a Bitmap that contain a series of images arranged from left to right. Use with BitmapWidth to specify how many pixels to display from the multiple-image Bitmap. Default is 0 (first item in a multiple-image Bitmap).

bitmapWidth

0

Specifies the number of pixels from the specified Bitmap that you want to display on your button. This property is only needed when you specify a Bitmap that contain a series of images arranged from left to right. Use with BitmapOffset, which specifies the starting point of the image you want to display.

checked

false

Returns true if the button has itsTwoState property set to true. Otherwise returns false.

className

(TOOLBUTTON)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

enabled

true

Logical value that specifies whether or not the button responds when clicked. When set to false, the operating system attempts to visually change the button with hatching or a low-contrast version of the bitmap to indicate that the button is not available.

parent

N/A

An object reference that points to the parent ToolBar.

separator

false

Logical value that lets you set a vertical line on the toolbar to visually group buttons. If you specify a separator button, only its Visible property has any meaning.

speedTip

 

Specifies the text that appears when the mouse rests over a button for more than one second.

twoState

true

Logical value that determines whether the button displays differently when it has been depressed and consequently sets the Checked property to true.

visible

false

Logical value that lets you hide (false) or show (true) the button.

 

Event

Parameters

Description

onClick

 

After the button is clicked.

 

Description

Use class ToolButton to define the buttons on an existing toolbar.