F > FListBox (component) |
![]() ![]() ![]() |
FListBox (component)
The ListBox component in the Flash authoring environment provides drag-and-drop functionality for adding scrollable single-selection and multiple-selection list boxes to Flash documents; it also provides a user interface for setting basic parameters. The methods of the FListBox component allow you to control list boxes at runtime: you can create list boxes, control list boxes created in authoring, set or override basic parameters, and set additional runtime options. You do not need to use a constructor to access the methods of components.
Component methods do not perform error checking for type, as do other native ActionScript objects and actions; therefore, it is recommended that you validate parameters before passing them to methods.
The ListBox component is supported by Flash Player 6 and later versions of the Flash Player.
For information on using the ListBox component, setting parameters during authoring, and changing the color and appearance of components, see Customizing component colors and text and Customizing component skins in the Using Components chapter of Using Flash.
Method Description Adds a new item to the end of the list box. Adds a new item to the list box at the specified index. Returns Returns the label and value of the item at the specified index. Returns the number of items in the list box. Returns the number of items visible in the list box. Returns the index of the item at the top of the list box. Returns the index of the last selected item. Returns the indexes of multiple selected items. Returns the label and value of the selected item. Returns the label and value of multiple selected items. Returns Returns the label of the selected item or any associated data information. Registers a skin element to a property. Removes all items from the list box. Removes the item at the specified index. Replaces the label and data of an item at a specified index with a new label and data. Determines whether a scroll bar is hidden ( Assigns a function to call each time the selection changes. Associates an outside object with the list box. Specifies whether the list box is enabled ( Registers a symbol linkage ID to use for displaying items in the list box. Determines the number of items displayed in the list box. Causes the list box to scroll so that the item at the specified index is displayed at the top of the list. Selects the item at the specified index and updates the list box. Selects the items at the specified indexes and updates the list box. Determines whether the user can select more than one item in the list ( Sets the width and height of the list box, in pixels. Sets a single style property for a component. Sets the width of the list box, in pixels. Sorts the items in the list box alphabetically or numerically using the label or the data.
Method summary for the FListBox component
true
if the list box is enabled, false
if it is disabled.
true
if multiple selection is allowed, false
if single selection is allowed.
true
) or displayed (false
) when the number of items in the list box does not require scrolling.
true
) or disabled (false
).
true
) or not (false
).
![]() ![]() ![]() |