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 Optional
Clickable boolean Optional true
Enabled boolean Optional true
Icon Image Optional
ItemType enum Optional
OnPress ActionOrRule Optional
SystemItem SystemItem Optional
Visible boolean Optional true
Width integer Optional
_Name string Optional
_Type const Required

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 equal to one of the known values below.

ItemType Known Values

Value Description
Button
Normal

OnPress

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


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 equal to:

"Control.Type.ToolbarItem"