| Package | examples.toolkit1 |
| Class | public class PickerExample01 |
| Inheritance |
PickerExample01
View
|
A sample of the Picker component.
Tips:autoRepeat property to allow the user to hold the
buttons down and have the value change.
cycleData property to allow the Picker to cycle data
from start to end and end to start.
repeatInterval style to adjust the duration it takes
the Picker to select the next item when a user holds down a button.
See Also
| Variable | Defined by | |||
|---|---|---|---|---|
|
idNumberPicker
: Picker
A simple Picker that picks an ArrayList of numbers.
|
PickerExample01 | |||
|
idTextPicker
: Picker
A simple Picker that picks an ArrayList of strings.
|
PickerExample01 | |||
| idNumberPicker | variable |
public var idNumberPicker : PickerA simple Picker that picks an ArrayList of numbers.
| idTextPicker | variable |
public var idTextPicker : PickerA simple Picker that picks an ArrayList of strings.
<?xml version="1.0" encoding="utf-8"?>
<!--
@LICENSE@
-->
<!--
PickerExample01.mxml
@PROJECT_BLOCK@
-->
<!---
* A sample of the Picker component.
*
* @title Picker Example 1
* @tip Use the <code>autoRepeat</code> property to allow the user to hold the
* buttons down and have the value change.
* @tip Use the <code>cycleData</code> property to allow the Picker to cycle data
* from start to end and end to start.
* @tip Use the <code>repeatInterval</code> style to adjust the duration it takes
* the Picker to select the next item when a user holds down a button.
* @source
* @mobile
* @image assets/examples/toolkit1/PickerExample01_160.png
* @author Michael Schmalle
* @copyright Teoti Graphix, LLC
* @see com.teotigraphix.ui.components.Picker
* @see com.teotigraphix.ui.components.supportClasses.PickerBase#cycleData
* @see com.teotigraphix.ui.components.supportClasses.PickerBase#autoRepeat
* @see com.teotigraphix.ui.components.supportClasses.PickerBase#style:repeatInterval
-->
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:tg="http://tg.teotigraphix.com/flex4"
title="Picker Example01">
<s:layout>
<s:HorizontalLayout paddingTop="25"
horizontalAlign="center"/>
</s:layout>
<!--- A simple Picker that picks an ArrayList of numbers. -->
<tg:Picker id="idNumberPicker">
<s:ArrayList>
<fx:String>1</fx:String>
<fx:String>2</fx:String>
<fx:String>3</fx:String>
<fx:String>4</fx:String>
<fx:String>5</fx:String>
<fx:String>6</fx:String>
<fx:String>7</fx:String>
</s:ArrayList>
</tg:Picker>
<!--- A simple Picker that picks an ArrayList of strings. -->
<tg:Picker id="idTextPicker"
autoRepeat="true"
repeatInterval="150"
cycleData="true"
typicalItem="XXXXX">
<s:ArrayList>
<fx:String>One</fx:String>
<fx:String>Two</fx:String>
<fx:String>Three</fx:String>
<fx:String>Four</fx:String>
<fx:String>Five</fx:String>
<fx:String>Six</fx:String>
<fx:String>Seven</fx:String>
</s:ArrayList>
</tg:Picker>
</s:View>