Skip to content

ToolBarItem

ToolBarItem is a control item that can be added to the tool bar.

ToolBarItem Properties

Property Type Required Default
Caption string No
Clickable boolean No true
Enabled boolean No true
Icon Image No
ItemType enum No
OnPress ActionOrRule No
Style string No
SystemItem SystemItem No
Visible boolean No true
Width integer No
_Name string No
_Type const Yes

Caption

Displayed label of the toolbar item. The default value is the same as the value of _Name.

  • type: string

Clickable

Indicates if the toolbar item is clickable. If the value is false, the item cannot be enabled and behaves like a label.

  • type: boolean
  • default: true

Enabled

Enables or disables the toolbar item.

  • type: boolean
  • default: true

Icon

Adds an image to your toolbar. Overwrites Caption, if specified.


ItemType

Indicates the item type of the toolbar item. It provides two options: Normal (text button) and Button (contained button). This parameter is applicable only to Android.

  • type: enum

The value of this property must be one of the known values listed below.

ItemType Known Values

Value Description
Button
Normal

OnPress

Action/Rule to be triggered when the toolbar item is pressed.


Style

The string value is a style class name for Icon.

  • type: string

SystemItem

Adds predefined system-supplied icon or text. Overwrites Caption and Icon if specified.

If you set the width but not the icon or caption, then an empty space with the specified width will be rendered.

On Android devices, the SystemItem renders with black colored icon due to the white background.


Visible

Set the visibility of this control.

  • type: boolean
  • default: true

Width

The width of the control in Device Independent Pixel. The DIP value will be converted to pixels of the platform (based on scale and on density for iOS and Android respectively).

Mandatory if SystemItem is set to FixedSpace, optional for Caption and Icon.

By default, the caption and icon widths are calculated automatically.

  • type: integer

_Name

  • type: string

_Type

  • type: const

The value of this property must be:

"Control.Type.ToolbarItem"