• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Adding Display Components > Adding a Combo Text Box

Adding a Combo Text Box

The ComboBox component creates a drop-down list of selectable options. They can be either static or editable. The static ComboBox component allows a user to make a single selection from a drop-down list. An editable ComboBox component lets users enter text into a text field located at the top of the list, as well as selecting an item from a drop-down list. A ComboBox component is composed of three subcomponents: Button, TextInput, and List components. When a visitor selects an item, the label of the selection is automatically copied to the text field at the top of the combo box. The ComboBox component is an excellent way to offer several choices to a user, without the necessity of them having to type in a response. For example, a ComboBox could be used to list all of the states in the union in a drop-down box; giving the user the chance to select his home state. When the ComboBox displays in a Flash document, it appears as a single line; clicking the triangle to the right of the line, expands the box and displays all the available options.

Add a ComboBox Component

Open the Components panel.

Click the UI Components Expand triangle.

Drag the ComboBox component onto the Stage, and then select the component.

Open the Component Inspector panel, and then select the Parameters tab.

Select from the following ComboBox parameters:

  • data. Click the value field, and then enter an array in the Values dialog box. Click the plus (+) sign to add values, and the minus sign (-) to remove a value. Data values are used to populate the drop-down list.

  • editable. When you click the value field, and select true, the field can be edited. If you select false, the field can be selected but not edited.

  • labels. Click the value field, and then enter an array in the Values dialog box. Click the plus (+) sign to add values, and the minus sign (-) to remove a value. Data values are used as the selectable items in the list.

  • rowCount. Click the value field, and then enter a number to determine the maximum height of the drop-down list.

  • enabled. When you click the value field, and select true, the items in the list can be selected. If you select false, the field appears grayed out and is not selectable.

  • visible. When you click the value field, and select true, the field can be viewed. If you select false, the field is invisible.

  • minHeight. Click the value field, and then enter a minimum height for the ComboBox box.

  • minWidth. Click the value field, and then enter a minimum width for the ComboBox box.

IMPORTANT If there is not enough room for the ComboBox to open without hitting the bottom of the document, it will open up instead of down.

Click the Control menu, and then click Test Movie.

When you click the Select Your Computer list arrow, the list will open, and a selection can be made by clicking on one of the available options.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint