Package | com.ghostwire.ui.controls |
Class | public class uiComboBox |
Inheritance | uiComboBox ![]() ![]() ![]() ![]() |
uiComboBox
component combines a text input field (uiTextInput
) with a
drop-down list (uiListBox
).
"editable" Property
By default, the text input field is not editable. Set this property to true
to allow the
end-user to input text directly into the field.
"skin" Property
The default value is "ComboBox"
and the asset(s) used are:
ComboBox.png ComboBoxButton.png ComboBoxList.png ComboBoxListItem.png
~ This class is available in Aspire UI Components Lite Edition ~
Property | Defined by | ||
---|---|---|---|
![]() | alignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
| uiComponent | |
![]() | alignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
| uiComponent | |
![]() | background : Object
Indicates the style of the background for this component.
| uiComponent | |
![]() | container : uiComponent
Indicates the
uiComponent instance that contains this instance. | uiComponent | |
![]() | defaultEmbedFonts : Boolean [static]
Deprecated.
| uiText | |
![]() | depth : int
Indicates how deep the component is in the containment hierarchy.
| uiComponent | |
![]() | desiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
| uiComponent | |
![]() | desiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
| uiComponent | |
![]() | displayAsPassword : Boolean
Indicates whether the text should be shown as asterisks instead of the actual characters.
| uiTextInput | |
![]() | editable : Boolean
Indicates whether the text can be edited by the user.
| uiTextInput | |
![]() | ellipsis : String = "..." [static]
Indicates the string to use as an ellipsis if
ellipsize is set to true . | uiText | |
![]() | ellipsize : Boolean
Always false.
| uiTextInput | |
![]() | embedFonts : Boolean
Indicates whether this
uiText object should use embedded fonts. | uiText | |
![]() | enabled : Boolean
Indicates whether the component is enabled for user interaction.
| uiComponent | |
![]() | fillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
horizontal space.
| uiComponent | |
![]() | fillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
vertical space.
| uiComponent | |
![]() | focusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus
rectangle.
| uiComponent | |
![]() | focusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it
is in focus.
| uiComponent | |
![]() | height : Number
Indicates the current
height of the component. | uiComponent | |
![]() | hint : String
Indicates the text to display in the text field when there is no input value and the instance is
not in focus.
| uiTextInput | |
![]() | html : Boolean
Indicates whether the text is HTML enabled.
| uiText | |
![]() | imeMode : String
Indicates the mode of the input method editor (IME).
| uiTextInput | |
![]() | margin : Object
Indicates the thickness of the space surrounding the component.
| uiComponent | |
![]() | maxHeight : int
Indicates the upper limit for
height . | uiComponent | |
![]() | maxWidth : int
Indicates the upper limit for
width . | uiComponent | |
![]() | minHeight : int
Indicates the lower limit for
height . | uiComponent | |
![]() | minWidth : int
Indicates the lower limit for
width . | uiComponent | |
![]() | padding : Object
Indicates the thickness of the interior space from the edge of the component to the content area,
which is where child components, if any, are contained.
| uiComponent | |
![]() | restrict : String
Indicates the set of characters that a user can enter into the text field.
| uiTextInput | |
rowCount : int
Indicates the preferred number of rows to display.
| uiComboBox | ||
rowHeight : int
Indicates the fixed value to be used for the height of every row in the list.
| uiComboBox | ||
![]() | selectable : Boolean
Indicates whether the text is selectable.
| uiText | |
selectedIndex : int
Indicates the
index position of the selected item. | uiComboBox | ||
selectedItem : Object
Indicates the selected item.
| uiComboBox | ||
selectedValue : Object [read-only]
Indicates the text associated with the selected item, or the input text
if
editable if true. | uiComboBox | ||
![]() | skin : String
Indicates the name of the skin to use for this component instance.
| uiComponent | |
![]() | stretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this
component.
| uiComponent | |
![]() | text : String
Indicates the current text displayed by the component.
| uiText | |
![]() | textField : TextField
Indicates the native Flash Player
TextField object embedded in this uiText
instance. | uiText | |
![]() | toolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers
over this control.
| uiComponent | |
![]() | uiskin : uiBitmapImage
Returns the
uiBitmapImage rendered as the skin - for advanced users only. | uiComponent | |
![]() | visible : Boolean
Indicates whether or not the component is visible within its container.
| uiComponent | |
![]() | width : Number
Indicates the current
width of the component. | uiComponent | |
![]() | wrap : Boolean
Indicates whether the text should wrap.
| uiText |
Method | Defined by | ||
---|---|---|---|
uiComboBox(items:Array = null)
Constructor - creates a new
uiComboBox instance. | uiComboBox | ||
close():void
Closes the pop-up list, dispatching an
Event.CLOSE event. | uiComboBox | ||
![]() |
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
| uiComponent | |
![]() |
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
| uiComponent | |
open():void
Opens the pop-up list, dispatching an
Event.OPEN event. | uiComboBox | ||
![]() |
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
| uiComponent | |
![]() |
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its
tabEnabled property set to true , otherwise this method will fail
silently. | uiComponent | |
![]() |
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified
width and height . | uiComponent | |
![]() |
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
| uiComponent | |
![]() |
validateNow():void
Validates and render the component instance, and any component instances with
depth higher than itself in the validation queue, immediately. | uiComponent |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when the user changes the selection. | uiComboBox | |||
![]() | Dispatched when the text in the component changes. | uiTextInput | ||
Dispatched when the popup list is closed. | uiComboBox | |||
![]() |
Dispatched when the component's visible property is changed from true to
false via calling the setVisible() method. | uiComponent | ||
![]() |
Dispatched when the component's position within its parent container has changed via calling the
move() method. | uiComponent | ||
Dispatched when the popup list is opened. | uiComboBox | |||
![]() |
Dispatched when the component's size has changed via calling the setSize() method. | uiComponent | ||
![]() |
Dispatched when the component's visible property is changed from false to
true via calling the setVisible() method. | uiComponent | ||
![]() | Dispatched when the user enters, deletes, or pastes text into the component. | uiTextInput |
rowCount | property |
rowCount:int
[read-write]Indicates the preferred number of rows to display.
The default value is 8
.
public function get rowCount():int
public function set rowCount(value:int):void
rowHeight | property |
rowHeight:int
[read-write]
Indicates the fixed value to be used for the height of every row in the list.
If set to 0
, the height of the first item in the model will be used.
If set to -1
, it means that variable heights are intended. This can
be computationally expensive, so use this with caution if you have a large list.
The default value is 0
.
public function get rowHeight():int
public function set rowHeight(value:int):void
selectedIndex | property |
selectedIndex:int
[read-write]
Indicates the index
position of the selected item.
This property returns -1
if no item has been selected. Note that
where editable
property is true
, if the user selects
an item but subsequently edits over the text, the item is deselected.
Setting this property selects the indicated item. To clear all
selection, set this property to -1
. Setting this property does
not dispatch any change
event.
The default value is -1
.
public function get selectedIndex():int
public function set selectedIndex(value:int):void
See also
selectedItem | property |
selectedItem:Object
[read-write]Indicates the selected item.
This property returns null
if no item has been selected.
If editable
property is true
, if the user selects an item
but subsequently edits over the text, the item is deselected, in which case an object
with the properties label
and data
both set to the input text
will be returned.
Setting this property selects the indicated item. To clear all
selection, set this property to null
. Setting this property does
not dispatch any change
event.
The default value is null
.
public function get selectedItem():Object
public function set selectedItem(value:Object):void
See also
selectedValue | property |
selectedValue:Object
[read-only]
Indicates the text associated with the selected item, or the input text
if editable
if true.
The default value is null
.
public function get selectedValue():Object
uiComboBox | () | constructor |
public function uiComboBox(items:Array = null)
Constructor - creates a new uiComboBox
instance.
items:Array (default = null ) — [Optional] An array of objects defining the items in the drop-down list.
|
close | () | method |
public function close():void
Closes the pop-up list, dispatching an Event.CLOSE
event. Calling this method
has no effect if the pop-up list is not opened or the uiComboBox
instance is not
yet added to the display list.
open | () | method |
public function open():void
Opens the pop-up list, dispatching an Event.OPEN
event. Calling this method
has no effect if the pop-up list is already opened, the uiComboBox
is not yet added to
the display list, or if the data model is empty.
The pop-up list will be positioned below the uiComboBox
instance if there is enough
space. Otherwise, it will be positioned above the uiComboBox
instance if there is
more space above than below.
change | event |
flash.events.Event
Dispatched when the user changes the selection. If editable, this event is dispatched each time the user enters a keystroke in the text field.
close | event |
open | event |