Skip to main content

Button

This article introduces you to our custom Button app and its core features.

Info

The Button app is deployed to customer servers per request. To learn more contact our support at [email protected]!

Please note

This custom app is under active development and any information in this documentation could be inaccurate or outdated! If you have any questions please contact our support at [email protected]

What is Button?​

With the Button custom app you can easily create interactive buttons. You can fully tailor the button to your liking with various styling options, like icon selection, label animation or basic button styling.

Prerequisites​

To utilize the function of the Button app you only need to give it a touch event on the other tab. With the touch event you can do loads of things, like move to other pages or interact with other widgets on the page.

Styling Options​

After the Button is first placed on the editor it'll already have basic styling options.

Disable settings​

If you don't want text to appear on the button, then flipping this switch disables the button text.

Generic Settings​

Defines the text that appears on the Button

Note

On default if there's no button text defined, it defaults to "Button".

Icon Settings​

A dropdown menu that lets you choose an icon for the Button. The icons are from the Material font icons.

Work Mode​

Under Work Mode settings, Work Mode sets how the Button behaves: Press, Toggle or Dynamic label. In Toggle mode each press switches the Button on or off. Toggled on default sets the starting state.

Sensor Events​

On a device, the Button sends Sensor events that the rest of the Content can react to:

  • Button pressed: sent on every press, in every work mode. The value is the Button text.
  • Button toggle: sent in Toggle mode on every press. The value is true when the Button switches on and false when it switches off.

To make one Button do two different things (for example, mute and unmute a display):

  1. Set the Button's Work Mode to Toggle.
  2. Open the Content's Sensor events and actions window, on the Content wide events tab.
  3. Under Input settings, turn on Allow specifying sensor values.
  4. Add an event with Sensor event Button toggle and Sensor value true, and give it the action for the "on" state.
  5. Add a second event with Sensor event Button toggle and Sensor value false, and give it the action for the "off" state.

Alternatively, use a single event with an action batch:

  1. Add one event with Sensor event Button toggle, leave Sensor value empty, and set Action type to Execute action batch.
  2. Under Sent fields, forward the received value with the name value.
  3. In the batch, add two actions on the field value: one with Evaluation type is true and one with is false, each running its own action (for example, Set device volume).
Note

Sensor events fire on the device only, not in the preview.

Learn more:

External Messages​

The Button can be manipulated by external messages.

Set Button Text​

When the Button receives this message it takes the parameters value and sets the Button text to it. If the parameter is empty the Buttons text value will default to an empty string.

Reset Button Text​

When the Button receives this message it reverts the Button text value to the default set in the editor.

Switch disable state​

When the Button receives this message it switches between enabled and disabled.

Set disable state​

When the Button receives this message it disables the Button if the State value is true, and enables it if it is false. If the value is empty, the Button is disabled.

Set pressed state​

Works in Toggle mode only. When the Button receives this message it switches the Button on (true) or off (false) according to the State value, and sends the Button toggle Sensor event with the new value.