blob: bd1cd933ba09073382d45904b4115fbe1f54857a [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.ComboBox",
"baseClassname": "mx.controls.ComboBase"
,
"description": "The ComboBox control contains a drop-down list from which the user can select a single value. Its functionality is very similar to that of the SELECT form element in HTML. The ComboBox can be editable, in which case the user can type entries into the TextInput portion of the ComboBox that are not in the list. <p>The ComboBox control has the following default sizing characteristics:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>Wide enough to accommodate the longest entry in the drop-down list in the display area of the main control, plus the drop-down button. When the drop-down list is not visible, the default height is based on the label text size. <p>The default drop-down list height is five rows, or the number of entries in the drop-down list, whichever is smaller. The default height of each entry in the drop-down list is 22 pixels.</p></td> </tr> <tr> <td>Minimum size</td> <td>0 pixels.</td> </tr> <tr> <td>Maximum size</td> <td>5000 by 5000.</td> </tr> <tr> <td>dropdownWidth</td> <td>The width of the ComboBox control.</td> </tr> <tr> <td>rowCount</td> <td>5 rows.</td> </tr> </table> <p>The <code>&lt;mx:ComboBox&gt;</code> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n &lt;mx:ComboBox\\n <b>Properties</b>\\n dataProvider=&quot;null&quot;\\n dropdownFactory=&quot;<i>ClassFactory that creates an mx.controls.List</i>&quot;\\n dropdownWidth=&quot;<i>100 or width of the longest text in the dataProvider</i>&quot;\\n itemRenderer=&quot;null&quot;\\n labelField=&quot;label&quot;\\n labelFunction=&quot;null&quot;\\n prompt=&quot;null&quot;\\n rowCount=&quot;5&quot;\\n selectedIndex=&quot;-1&quot;\\n selectedItem=&quot;null&quot;\\n \\n <b>Styles</b>\\n alternatingItemColors=&quot;undefined&quot;\\n arrowButtonWidth=&quot;22&quot;\\n borderColor=&quot;0xB7BABC&quot;\\n borderThickness=&quot;1&quot;\\n closeDuration=&quot;250&quot;\\n closeEasingFunction=&quot;undefined&quot;\\n color=&quot;0x0B333C&quot;\\n cornerRadius=&quot;0&quot;\\n disabledColor=&quot;0xAAB3B3&quot;\\n disabledIconColor=&quot;0x919999&quot;\\n dropdownBorderColor=&quot;undefined&quot;\\n dropdownStyleName=&quot;comboDropdown&quot;\\n fillAlphas=&quot;[0.6,0.4]&quot;\\n fillColors=&quot;[0xFFFFFF, 0xCCCCCC]&quot;\\n focusAlpha=&quot;0.4&quot;\\n focusRoundedCorners=&quot;tl tr bl br&quot;\\n fontAntiAliasType=&quot;advanced|normal&quot;\\n fontFamily=&quot;Verdana&quot;\\n fontGridFitType=&quot;pixel|none|subpixel&quot;\\n fontSharpness=&quot;0&quot;\\n fontSize=&quot;10&quot;\\n fontStyle=&quot;normal|italic&quot;\\n fontThickness=&quot;0&quot;\\n fontWeight=&quot;normal|bold&quot;\\n highlightAlphas=&quot;[0.3,0.0]&quot;\\n iconColor=&quot;0x111111&quot;\\n leading=&quot;0&quot;\\n openDuration=&quot;250&quot;\\n openEasingFunction=&quot;undefined&quot;\\n paddingTop=&quot;0&quot;\\n paddingBottom=&quot;0&quot;\\n paddingLeft=&quot;5&quot;\\n paddingRight=&quot;5&quot;\\n rollOverColor=&quot;<i>Depends on theme color&quot;</i>\\n selectionColor=&quot;<i>Depends on theme color&quot;</i>\\n selectionDuration=&quot;250&quot;\\n selectionEasingFunction=&quot;undefined&quot;\\n textAlign=&quot;left|center|right&quot;\\n textDecoration=&quot;none|underline&quot;\\n textIndent=&quot;0&quot;\\n textRollOverColor=&quot;0x2B333C&quot;\\n textSelectedColor=&quot;0x2B333C&quot;\\n \\n <b>Events</b>\\n change=&quot;<i>No default</i>&quot;\\n close=&quot;<i>No default</i>&quot;\\n dataChange=&quot;<i>No default</i>&quot;\\n enter=&quot;<i>No default</i>&quot;\\n itemRollOut=&quot;<i>No default</i>&quot;\\n itemRollOver=&quot;<i>No default</i>&quot;\\n open=&quot;<i>No default</i>&quot;\\n scroll=&quot;<i>No default</i>&quot;\\n /&gt;\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/SimpleComboBox.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.List", "mx.effects.Tween", "mx.managers.PopUpManager"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.controls.ComboBox",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "labelField",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "Object",
"qname": "dropdown",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "A reference to the List control that acts as the drop-down in the ComboBox.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "data",
"namespace": "public",
"bindable": ["dataChange"],
"details": [],
"deprecated": {},
"description": "The <code>data</code> property lets you pass a value to the component when you use it in an item renderer or item editor. You typically use data binding to bind a field of the <code>data</code> property to a property of this component. <p>The ComboBox control uses the <code>listData</code> property and the <code>data</code> property as follows. If the ComboBox is in a DataGrid control, it expects the <code>dataField</code> property of the column to map to a property in the data and sets <code>selectedItem</code> to that property. If the ComboBox control is in a List control, it expects the <code>labelField</code> of the list to map to a property in the data and sets <code>selectedItem</code> to that property. Otherwise, it sets <code>selectedItem</code> to the data itself.</p> <p>You do not set this property in MXML.</p>",
"tags": [
{ "tagName": "see",
"values": ["mx.core.IDataRenderer"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "mx.controls.listClasses.BaseListData",
"qname": "listData",
"namespace": "public",
"bindable": ["dataChange"],
"details": [],
"deprecated": {},
"description": "When a component is used as a drop-in item renderer or drop-in item editor, Flex initializes the <code>listData</code> property of the component with the appropriate data from the List control. The component can then use the <code>listData</code> property and the <code>data</code> property to display the appropriate information as a drop-in item renderer or drop-in item editor. <p>You do not set this property in MXML or ActionScript; Flex sets it when the component is used as a drop-in item renderer or drop-in item editor.</p>",
"tags": [
{ "tagName": "see",
"values": ["mx.controls.listClasses.IDropInListItemRenderer"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "selectedLabel",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The String displayed in the TextInput portion of the ComboBox. It is calculated from the data by using the <code>labelField</code> or <code>labelFunction</code>.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "itemToLabel",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns a string representing the <code>item</code> parameter. <p>This method checks in the following order to find a value to return:</p> <ol> <li>If you have specified a <code>labelFunction</code> property, returns the result of passing the item to the function.</li> <li>If the item is a String, Number, Boolean, or Function, returns the item.</li> <li>If the item has a property with the name specified by the control's <code>labelField</code> property, returns the contents of the property.</li> <li>If the item has a label property, returns its value.</li> </ol> If the item is null, this method returns the empty string.",
"tags": [
{ "tagName": "param",
"values": ["item The object that contains the value to convert to a label."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["A string representing the <code>item</code> parameter."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "String",
"params": [{ "name": "item", "type": "Object"},
{ "name": "rest", "type": "Array"}]}
]
,
"events": [
{ "qname": "change",
"type": "mx.events.ListEvent"
,
"description": "Dispatched when the ComboBox contents changes as a result of user interaction, when the <code>selectedIndex</code> or <code>selectedItem</code> property changes, and, if the ComboBox control is editable, each time a keystroke is entered in the box.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.ListEvent.CHANGE"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "close",
"type": "org.apache.royale.events.Event"
,
"description": "Dispatched when the drop-down list is dismissed for any reason such when the user: <ul> <li>selects an item in the drop-down list</li> <li>clicks outside of the drop-down list</li> <li>clicks the drop-down button while the drop-down list is displayed</li> <li>presses the ESC key while the drop-down list is displayed</li> </ul>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.DropdownEvent.CLOSE"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "dataChange",
"type": "mx.events.FlexEvent"
,
"description": "Dispatched when the <code>data</code> property changes. <p>When you use a component as an item renderer, the <code>data</code> property contains an item from the dataProvider. You can listen for this event and update the component when the <code>data</code> property changes.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.FlexEvent.DATA_CHANGE"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "enter",
"type": "mx.events.FlexEvent"
,
"description": "Dispatched if the <code>editable</code> property is set to <code>true</code> and the user presses the Enter key while typing in the editable text field.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.FlexEvent.ENTER"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "itemRollOut",
"type": "mx.events.ListEvent"
,
"description": "Dispatched when user rolls the mouse out of a drop-down list item. The event object's <code>target</code> property contains a reference to the ComboBox and not the drop-down list.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.ListEvent.ITEM_ROLL_OUT"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "itemRollOver",
"type": "mx.events.ListEvent"
,
"description": "Dispatched when the user rolls the mouse over a drop-down list item. The event object's <code>target</code> property contains a reference to the ComboBox and not the drop-down list.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.ListEvent.ITEM_ROLL_OVER"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "open",
"type": "org.apache.royale.events.Event"
,
"description": "Dispatched when the user clicks the drop-down button to display the drop-down list. It is also dispatched if the user uses the keyboard and types Ctrl-Down to open the drop-down.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.DropdownEvent.OPEN"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "scroll",
"type": "mx.events.ScrollEvent"
,
"description": "Dispatched when the user scrolls the ComboBox control's drop-down list.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.ScrollEvent.SCROLL"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}