mx.controls
Class ComboBase


Direct Known Subclasses
           mx.controls.ComboBox, mx.controls.DateField

class ComboBase
extends mx.core.UIComponent

The ComboBase control includes a dataProvider, a textField and a button. The dataProvider and its API come from DataSelector. Subclasses can add a data picker, such as a pull-down.

MXML Syntax

The <mx:ComboBase> tag inherits all the properties of its parent classes, and the following properties:

 <mx:tagname
dataProvider="No default.
editable="false|true"
length="No default.
multipleSelection="false|true"
restrict="No default."
selectedIndex="No default."
selectedItem="No default."
selectedItems="No default."
text="No default."
textField="No default."
value="No default."
/>

See Also
mx.controls.SimpleButton
mx.controls.TextInput
mx.controls.listclasses.DataProvider
mx.controls.listclasses.DataSelector



Methods
      addItem
Appends an item to the end of the list
      addItemAt
Adds an item at the specified location in the list.
      getItemAt
Gets an item at the specified location in the list.
      removeAll
Removes all items from the list.
      removeItemAt
Removes an item from the specified location in the list.
      replaceItemAt
Replaces an item at the specified location in the list.
      setSize(w:Number, h:Number, noEvent) : Void
Determines the height and width of the component.
      sortItems
Sort items in a list.
      sortItemsBy
Sorts the list in ascending or descending order of the specified field.

Methods inherited from class mx.core.UIComponent
getFocus  setFocus  getFocusManager 

Methods inherited from class mx.core.UIObject
createAccessibilityImplementation  measure  doLater  cancelAllDoLaters  invalidate  invalidateStyle  invalidateProperties  invalidateSize  redraw  move  setSize  setSizeNoLayout  drawRect  fillRect  destroyLabel  createClassObject  createEmptyObject  destroyObject  getStyle  setMask  swapDepths 


Properties
staticversion:String  
ComponentVersion is for internal use only.
      dataProvider:Object  
List of data to display.
      length:Number   [Read-Only]
Number of items in the list.
      value:Object  
Gets an item from the list that matches the specified value.
      selectedIndex:Number  
Specific location in the list.
      selectedItems:Array  
Specific items in the list.
      selectedItem:var  
Specific item in the list.
      multipleSelection:Boolean  
If true, allows selection of multiple items in the list.
      editable:Boolean   [Read-Write]
If true, the ComboBox is editable.
      text:String   [Read-Write]
Contents of the text field.
      textField:   [Read-Only]
Reference to the TextInput component.
      restrict:String   [Read-Write]
Set of characters that a user can enter into the text field.

Properties inherited from class mx.core.UIComponent
version  enabled  tabIndex 

Properties inherited from class mx.core.UIObject
version  nestLevel  dispatchEvent  addEventListener  handleEvent  removeEventListener  kStretch  styleName  className  setStyle  parentApplication  isDocument  parentDocument  documentDescriptor  descriptor  instanceIndices  repeaterIndices  getRepeaterItem  id  width  height  x  y  minHeight  minWidth  preferredHeight  preferredWidth  maxHeight  maxWidth  widthFlex  heightFlex  visible  scaleX  scaleY  alpha  depth  mouseX  mouseY  toolTip  baselinePosition 


Effects

Effects inherited from class mx.core.UIComponent
showEffect  hideEffect  focusInEffect  focusOutEffect 

Effects inherited from class mx.core.UIObject
creationCompleteEffect  moveEffect  resizeEffect  mouseDownEffect  mouseOverEffect  mouseOutEffect  mouseUpEffect 


Events

Events inherited from class: mx.core.UIComponent
focusIn  focusOut  keyDown  keyUp  show  hide  valid  invalid  valueCommitted 

Events inherited from class: mx.core.UIObject
initialize  creationComplete  resize  move  draw  load  unload  mouseDown  mouseUp  mouseMove  mouseOver  mouseOut  mouseDownSomewhere  mouseUpSomewhere  mouseMoveSomewhere  mouseChangeSomewhere  effectStart  effectEnd  dragBegin  dragComplete  dragEnter  dragOver  dragExit  dragDrop 


Styles

Styles inherited from class mx.core.UIComponent
backgroundColor  backgroundDisabledColor  backgroundImage  backgroundAlpha  backgroundSize  barColor  borderCapColor  borderColor  buttonColor  borderStyle  disabledColor  errorColor  highlightColor  lineHeight  modalTransparency  scrollTrackColor  shadowColor  shadowCapColor  symbolColor  symbolBackgroundColor  symbolBackgroundDisabledColor  symbolBackgroundPressedColor  symbolDisabledColor  themeColor 

Styles inherited from class mx.core.UIObject
color  fontFamily  fontSize  fontStyle  fontWeight  textAlign  textDecoration  textIndent  marginLeft  marginRight  horizontalGap  verticalGap 


Method Detail

addItem

addItem() :  Void

Appends an item to the end of the list

Returns
     Added item.


addItemAt

addItemAt() :  Void

Adds an item at the specified location in the list.

Returns
     Added item.


getItemAt

getItemAt() :  Void

Gets an item at the specified location in the list.

Returns
     Item at specified location.


removeAll

removeAll() :  Void

Removes all items from the list.


removeItemAt

removeItemAt() :  Void

Removes an item from the specified location in the list.

Returns
     Removed item.


replaceItemAt

replaceItemAt() :  Void

Replaces an item at the specified location in the list.


setSize

setSize(w:Number, h:Number, noEvent) : Void

Determines the height and width of the component.

Parameters
     w - Width of the component.
     h - Height of the component.
     noEvent - Whether a resize event is fired: if false, no event is fired.


sortItems

sortItems() :  Void

Sort items in a list.


sortItemsBy

sortItemsBy() :  Void

Sorts the list in ascending or descending order of the specified field.


Property Detail

dataProvider

dataProvider:Object  

List of data to display.


editable

editable:Boolean   [Read-Write]

If true, the ComboBox is editable.


length

length:Number   [Read-Only]

Number of items in the list.


multipleSelection

multipleSelection:Boolean  

If true, allows selection of multiple items in the list. The default value is false.


restrict

restrict:String   [Read-Write]

Set of characters that a user can enter into the text field.


selectedIndex

selectedIndex:Number  

Specific location in the list.


selectedItem

selectedItem:var  

Specific item in the list.


selectedItems

selectedItems:Array  

Specific items in the list.


text

text:String   [Read-Write]

Contents of the text field.


textField

textField:   [Read-Only]

Reference to the TextInput component.


value

value:Object  

Gets an item from the list that matches the specified value.


version

static version:String  

ComponentVersion is for internal use only.