FComboBox and FListBox

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Appendix G.  Flash UI Component Summary
FComboBox and FListBox support for standard UI combo boxes (i.e., drop-down lists) and list boxes

Table G-1 juxtaposes the methods of the FComboBox and FListBox objects. Note how they share the majority of methods, although FListBox supports selecting multiple line items simultaneously

Table G-1. FComboBox and FListBox methods

Method

Description

FComboBox

FListBox

addItem( )

Appends an item to the list of items in the box

addItemAt( )

Adds an item at the specified position in the list

getEnabled( )

Boolean indicating whether the element is enabled or dimmed ("grayed-out")

getItemAt( )

Returns the list item at the specified position

getLength( )

Returns the number of items in the list

getRowCount( )

Returns the number of rows displayed in a scrolling list

getScrollPosition( )

Returns the line number of the top row displayed

getSelectedIndex( )

Returns the index of the current list selection

getSelectedIndices( )

Returns an array of indexes of, potentially, multiple selections

getSelectedItem( )

Returns the selected list item as an object

getSelectedItems( )

Returns an array of selected items as objects

getSelectMultiple( )

Boolean indicating whether multiple items can be selected in a list box

getValue( )

Returns the value of the selected item

registerSkinElement( )

Registers a skin element for changing the component appearance

removeAll( )

Removes all items from the list

removeItemAt( )

Removes a specified item in the list

replaceItemAt( )

Replaces the item at the specified position in the list

setAutoHideScrollBar( )

Boolean specifying whether to hide the scroll bar when it isn't needed

setChangeHandler( )

Specifies the callback function to call when the list's state changes

setDataProvider( )

Specifies an array of elements or a DataProvider object to populate the list

setEditable( )

Boolean specifying whether the combo box's contents are editable

setEnabled( )

Enables or disables (i.e., deactivates) the list box

setItemSymbol( )

Specifies the Library symbol ID of a graphics symbol for displaying list content

setRowCount( )

Specifies the maximum number of rows displayed in a list

setScrollPosition( )

Causes the list box to scroll to the specified item

setSelectedIndex( )

Selects an item in the list by its row index (zero-relative)

setSelectedIndices( )

Specifies an array of items (by index) to be selected

setSelectMultiple( )

Boolean specifying whether multiple items can be selected in a list box

setSize( )

Sets the width of the combo box or list box, in pixels (can also set height of a list box)

setStyleProperty( )

Sets a particular style property for the combo box or list box (for a list of supported properties, see the FStyleFormat object)

setValue( )

Sets the current value for a combo box

setWidth( )

Sets the list box width, in pixels

sortItemsBy( )

Sorts the items in the list by either their labels or the underlying data



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net