Documentation

Toggle Menu

Segmented Control (Radio Buttons)

This tile is great for allowing only one selection out of several. Like radio buttons.

Settings

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.

Options

Here you can set the options/segments for the tile. It is possible to add as many options as you want, but they may not all fit in the view. Note, be sure that each option is unique.

Input

You can set the selected segment by sending a string with the title of the sgement.

  • StringSegment Title → Select Segment with Segement Title

Usage Demo

Set the mode to Default.

                            self.force.sendMessage("Jordan's iPhone", "modeSelector", "Default")
                            

Output

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

  • Segment Tapped → StringSegment Title

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

Usage Demo

Sets the state of a program based on the input from the segmented control tile, with options Default and Advanced.

                            def forceServerDidReceiveData(self, deviceName, senderTag, data):
                                if senderTag == "modeSelector":
                                    if data == "Default":
                                        self.setModeDefault()
                                    else data == "Advanced":
                                        self.setModeAdvacned()