Using ActionScript 3.0 Components |
|
|
|
| Using the UI Components > Using the ComboBox > User interaction with the ComboBox | |||
You can use a ComboBox component in any form or application that requires a single choice from a list. For example, you could provide a drop-down list of states in a customer address form. You can use an editable ComboBox for more complex scenarios. For example, in an application that provides driving directions, you could use an editable ComboBox, to allow a user to enter her origin and destination addresses. The drop-down list would contain her previously entered addresses.
If the ComboBox is editable, meaning the editable property is true, the following keys remove focus from the text input box and leave the previous value. The exception is the Enter key, which applies the new value first, if the user entered text.
|
Key |
Description |
|---|---|
|
Shift + Tab |
Moves focus to the previous item. If a new item is selected, a |
|
Tab |
Moves focus to the next item. If a new item is selected, a |
|
Down Arrow |
Moves the selection down one item. |
|
End |
Moves the selection to the bottom of the list. |
|
Escape |
Closes the drop-down list and returns focus to the ComboBox. |
|
Enter |
Closes the drop-down list and returns focus to the ComboBox. When the ComboBox is editable, and the user enters text, Enter sets the value to the entered text. |
|
Home |
Moves the selection to the top of the list. |
|
Page Up |
Moves the selection up one page. |
|
Page Down |
Moves the selection down one page. |
When you add the ComboBox component to an application, you can make it accessible to a screen reader by adding the following lines of ActionScript code:
import fl.accessibility.ComboBoxAccImpl; ComboBoxAccImpl.enableAccessibility();
You enable accessibility for a component only once, regardless of how many instances you have of the component.
|
|
|
|