ToolbarItem

Overview

The toolbar item is similar to a button control in its functionality but has an adaptive layout suited for toolbar controls which may dictate the layout of its child elements. It's recommended using a toolbar item for toolbar buttons rather than a button class.

Ancestors

  1. None
 

Descendants

  1. None
 

See Also

  1. Toolbar

Constructors

new ToolbarItem
Description

Creates a new toolbar item.

Definition

new ToolbarItem()

Members

enabled
Description

Gets or sets whether the toolbar item is enabled or not. Note if set to false, the toolbar item may still be shown but dimmed to represent a disabled state.

Definition

bool toolbaritem.enabled
image
Description

Gets or sets the image to use on the toolbar item.

Definition

Image toolbaritem.image
title
Description

Gets or sets the text label on the toolbar item.

Definition

string toolbaritem.title
tooltip
Description

Gets or sets the tool tip on the toolbar item.

Definition

string toolbaritem.tooltip

Methods

addEventListener(eventName, callback)
Description

Adds an event listener for various control level events. The first parameter is the name of the event, the second parameter is the function to call when the event happens (e.g., a callback).

Definition

toolbaritem.addEventListener(eventName, callback)
Parameters
NameTypeDescription
eventName string The name of the control event to start listening to.
callback function The function that will be called when it occurs.
removeEventListener(eventName, callback)
Description

Removes an event listener for various control level events. The first parameter is the name of the event, the second parameter is the function that was originally given as the callback for addEventListener.

Definition

toolbaritem.removeEventListener(eventName, callback)
Parameters
NameTypeDescription
eventName string The name of the control event to stop listening to.
callback function The function that would have been called.