Documentation

Toggle Menu

Button

The Button is a versatile tile, which can be used to know when the button is pressed (down), when it is let go (up), and can send text from other tiles on the screen such as the Textfield or the TextBox. This inter-tile interactivity can be set without any coding on your behalf.

Settings

Actions

Here is where you configure what the button does when tapped. Multiple selection is allowed so a single tap may do several tasks such as:

  • Send text from textfield 'message'
  • Send 'Button Down'
  • Clear text in textfield 'message'

Note that 'message' is an example tile tag for a textfield.
Note that when sending text from other tiles. That text is sent with the respective tile's tag. E.G. 'message'.
Also note that text will always be sent before cleared from a text input source if both actions are selected.

Tag

This is a unique String ID assigned to this tile and is used (by you) to identify what tile sent what data by your script.
Note that this is case sensitive, and cannot contain any white space.

Size

This modifies the size of the button as it appears on your screen. Its units of measurement is tiles. Since each tile that can have its size modified is aware of its surroundings, the numeric steppers used to adjust the tile size will stop you from overlapping with other tiles or going over the edge of the screen.

Title

This is the title that will appear on your button in your controller UI. It is completely independent of the tag and will not be sent to the server.

Output

The following is what data is sent from this tile to the server/your script. It is in the format:
Action → Data TypeValue

  • Button Down → String\\\\BUTTON DOWN////

  • Button Up → String\\\\BUTTON UP////

Note that a tile's tag is always sent to the server for identification purposes.

Usage Demo

This is a simple demo where if a button is pressed down, it will call the function buttonDown() and when the button is released, it will call buttonUp().

                            def forceServerDidReceiveData(self, deviceName, senderTag, data):
                                if senderTag == "Button":
                                    if data == "\\\\BUTTON DOWN////":
                                        self.buttonDown()
                                    else:
                                        self.buttonUp()