Spinner Component
Properties
elements Specifies the list of choices to display.
| Data type: array |
||
| Designer Writable | false | |
| Code Writeable | true |
spinnerName.elements = choice1,choice2,choice3 |
| Code Readable | true |
let variable = spinnerName.elements |
elementsFromString Set the list of choices from a string of comma-separated values.
| Data type: string |
||
| Designer Writable | true |
<spinner name="spinnerName" elementsFromString="element1,element2,element3"> |
| Code Writeable | true |
spinnerName.elementsFromString = "element1,element2,element3" |
| Code Readable | false | |
height Specifies the Spinner's vertical height, measured in pixels.
| Data type: number |
||
| Designer Writable | false | |
| Code Writeable | true |
spinnerName.height = 45 |
| Code Readable | true |
let variable = spinnerName.height |
heightPercent Specifies the Spinner's vertical height as a percentage of the Screen's Height.
| Data type: number |
||
| Designer Writable | false | |
| Code Writeable | true |
spinnerName.heightPercent = 27 |
| Code Readable | false | |
prompt Specifies the text used for the title of the Spinner window.
| Data type: string |
||
| Designer Writable | true |
<spinner name="spinnerName" prompt="Test prompt"> |
| Code Writeable | true |
spinnerName.prompt = "Test prompt" |
| Code Readable | true |
let variable = spinnerName.prompt |
selection Specifies the current selected item in the Spinner.
| Data type: string |
||
| Designer Writable | true |
<spinner name="spinnerName" selection="element1"> |
| Code Writeable | true |
spinnerName.selection = "element1" |
| Code Readable | true |
let variable = spinnerName.selection |
selectionIndex Set the Spinner selection to the element at the given index. If an attempt is made to set this to a number less than 1 or greater than the number of items in the Spinner, SelectionIndex will be set to 0, and Selection will be set to the empty text.
| Data type: number |
||
| Designer Writable | false | |
| Code Writeable | true |
spinnerName.selectionIndex = 0 |
| Code Readable | true |
let variable = spinnerName.selectionIndex |
visible Specifies whether the Spinner should be visible on the screen. Value is true if the Spinner is showing and false if hidden.
| Data type: boolean |
||
| Designer Writable | true |
<spinner name="spinnerName" visible="true"> |
| Code Writeable | true |
spinnerName.visible = true |
| Code Readable | true |
let variable = spinnerName.visible |
width Specifies the horizontal width of the Spinner, measured in pixels.
| Data type: number |
||
| Designer Writable | false | |
| Code Writeable | true |
spinnerName.width = 320 |
| Code Readable | true |
let variable = spinnerName.width |
widthPercent Specifies the horizontal width of the Spinner as a percentage of the Screen's Width.
| Data type: number |
||
| Designer Writable | false | |
| Code Writeable | true |
spinnerName.widthPercent = 98 |
| Code Readable | false | |
class The styling class of the the component
| Data type: string |
||
| Designer Writable | true |
<spinner name="spinnerName" class="Test class"> |
| Code Writeable | false | |
| Code Readable | false | |
id The styling id of the the component
| Data type: string |
||
| Designer Writable | true |
<spinner name="spinnerName" id="Test id"> |
| Code Writeable | false | |
| Code Readable | false | |
name The name of the component that will be used to refer to it in code.
| Data type: string |
||
| Designer Writable | true |
<spinner name="spinnerName" name="testComponent"> |
| Code Writeable | false | |
| Code Readable | false | |
Methods
| Method name | Description | Parameters | ||||
|---|---|---|---|---|---|---|
| displayDropdown |
Displays the dropdown list for selection, same action as when the user clicks on the spinner. spinnerName.displayDropdown() |
|
||||
| addEventListener |
Method used to create event listeners. See Events below for samples. |
|
Events
| Event name | Description | Parameters | ||
|---|---|---|---|---|
| afterSelecting | Event called after the user selects an item from the dropdown list.
spinnerName.addEventListener(
"afterSelecting",
function (selection) {
//Your code here
}
)
|
|