Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
DropDownList

Package | org.apache.flex.html
Class | public class DropDownList
Inheritance | DropDownList Button UIButtonBase flash.display.SimpleButton
Subclasses | DropDownList

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The DropDownList class implements the basic equivalent of the `<select>` tag in HTML. The default implementation only lets the user see and choose from an array of strings. More complex controls would display icons as well as strings, or colors instead of strings or just about anything. The default behavior only lets the user choose one and only one item. More complex controls would allow mutiple selection by not dismissing the dropdown as soon as a selection is made.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | $height : Number [read-only] Retrieve the low-level bounding box height. | UIButtonBase
|  | $width : Number [read-only] Retrieve the low-level bounding box width. | UIButtonBase
|  | beads : Array The array property that is used to add additional beads to an MXML tag. | UIButtonBase
|  | className : String The classname. | UIButtonBase
|  | dataProvider : Object The data set to be displayed. | DropDownList
|  | element : IFlexJSElement [read-only] Each IUIBase has an element that is actually added to the platform's display list DOM. | UIButtonBase
|  | explicitHeight : Number The explicitly set width (as opposed to measured width or percentage width). | UIButtonBase
|  | explicitWidth : Number The explicitly set width (as opposed to measured width or percentage width). | UIButtonBase
|  | height : Number [override] The width of the component. | UIButtonBase
|  | id : String An id property for MXML documents. | UIButtonBase
|  | labelField : String The name of field within the data used for display. | DropDownList
|  | measurementBead : IMeasurementBead [read-only] A measurement bead, if one exists. | UIButtonBase
|  | model : Object An IBeadModel that serves as the data model for the component. | UIButtonBase
|  | percentHeight : Number The requested percentage height this component should have in the parent container. | UIButtonBase
|  | percentWidth : Number The requested percentage width this component should have in the parent container. | UIButtonBase
|  | selectedIndex : int The index of the selected item in the dataProvider. | DropDownList
|  | selectedItem : Object The data item selected in the dataProvider. | DropDownList
|  | style : Object The object that contains "styles" and other associated name-value pairs. | UIButtonBase
|  | styleString : String [write-only] The styles for this object formatted as an HTML style attribute. | UIButtonBase
|  | topMostEventDispatcher : IEventDispatcher [read-only] The top most event dispatcher. | UIButtonBase
|  | typeNames : String A list of type names. | UIButtonBase
|  | view : IBeadView An IBeadView that serves as the view for the component. | UIButtonBase
|  | width : Number [override] The width of the component. | UIButtonBase

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined By
--- | --- | ---
|  | $y : Number [read-only] Retrieve the low-level bounding box y. | UIButtonBase

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | DropDownList() Constructor. | DropDownList
|  | addBead(bead:IBead):void Add a bead to the strand. | UIButtonBase
|  | addedToParent():void | UIButtonBase
|  | getBeadByType(classOrInterface:Class):IBead Find a bead on the strand. | UIButtonBase
|  | isHeightSizedToContent():Boolean | UIButtonBase
|  | isWidthSizedToContent():Boolean | UIButtonBase
|  | removeBead(value:IBead):IBead Remove a bead from the strand. | UIButtonBase
|  | setHeight(value:Number, noEvent:Boolean = false):void | UIButtonBase
|  | setWidth(value:Number, noEvent:Boolean = false):void | UIButtonBase
|  | setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void | UIButtonBase
|  | setX(value:Number):void | UIButtonBase
|  | setY(value:Number):void | UIButtonBase

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | change | Dispatched when the user selects an item. | DropDownList
|  | click | Dispatched when the user clicks on a button. | Button

Property Detail

dataProvider | property

`dataProvider:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The data set to be displayed. Usually a simple array of strings. A more complex component would allow more complex data and data sets.

Implementation
`public function get dataProvider():Object`
`public function set dataProvider(value:Object):void`

labelField | property |

`labelField:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The name of field within the data used for display. Each item of the data should have a property with this name.

Implementation
`public function get labelField():String`
`public function set labelField(value:String):void`

selectedIndex | property |

`selectedIndex:int`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The index of the selected item in the dataProvider. Values less than 0 can have specific meanings but generally mean that no item is selected because the user has typed in a custom entry or has yet to make a choice.

This property can be used as the source for data binding.

Implementation
`public function get selectedIndex():int`
`public function set selectedIndex(value:int):void`

selectedItem | property |

`selectedItem:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The data item selected in the dataProvider. null usually means that the user has not selected a value and has typed in a custom entry.

This property can be used as the source for data binding.

Implementation
`public function get selectedItem():Object`
`public function set selectedItem(value:Object):void`
Constructor Detail

DropDownList | () | Constructor

`public function DropDownList()`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Constructor.

Event Detail

change | Event

Event Object Type: `org.apache.flex.events.Event`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Dispatched when the user selects an item.

Mon Sep 5 2016, 07:19 AM -07:00