Skip to main content

Button

A <button> is used inside a <layout> to trigger an action when the user clicks on it.

Attributes​

AttributeTypeDefaultDescription
tooltipSee the Tooltip attributes reference
BehaviorsSee the Behaviors attribute reference
actionSTRINGRequired. Define the click action. See the available actions
upStateSTRINGRequired. Default aspect. Referencing a media or library graphic resource
downStateSTRINGAspect of the button when pressed. Referencing media or library graphic resource
overStateSTRINGAspect when cursor is over the button. Referencing media or library graphic resource
disabledStateSTRINGAspect when the button is disabled. Referencing media or library graphic resource
info

A <button> element must be placed inside a <layout> element.

info

If a state is missing, upState is used instead.

You can build submenus by adding other buttons as children elements and by using the submenu action.

The following additional attributes are then available:

AttributeTypeDefaultDescription
orientationSTRINGverticalSpecifies the way the submenu items are distributed. It can be either horizontal or vertical
spacerINTEGER0Sets the space in pixels between the button's children. If not specified, the parent layout spacer value is used instead
backgroundColorCOLOR0x000000Sets the submenu's background color
borderColorCOLOR0x000000Sets the submenu's border color
borderSizeINTEGER0Sets the border's thickness in pixels
cornerRadiusINTEGER0Sets the border corner's roundness (in pixels, 0 being square corners)
horizontalMarginINTEGER0Sets the margin between the side borders and the submenu's content
verticalMarginINTEGER0Sets the margin between the top and bottom borders and the submenu's content