Chapter 8. Using Flex Controls

Through previous chapters, I've described various aspects of Flex application development and declared instances of controls such as Label and Button.

Flex uses two types of visual components:

  • Containers are visual components that can contain other objects.

  • Controls are visual components that display information or provide the application with user interaction capabilities.

A Flex control can serve two purposes:

  • All controls help you create the visual presentation of the application.

  • Interactive controls allow the user to provide you with information through data entry and mouse gestures (such as moving the mouse or clicking its buttons).

In this chapter, I describe the nature of Flex controls and show the interface and usage of commonly used controls in data entry forms and other visual presentations.

Note

To use the sample code for this chapter, import the chapter08.zip Flex project archive file from the Web site files into your Flex Builder workspace. In addition to the specific applications in the Listings in this chapter, the Web site files include sample applications for most of the controls described here.

Instantiating and Customizing Controls

As described previously, a Flex control is really an Action Script class that can be instantiated either with an MXML tag-based declaration or an Action Script statement.

In order to determine the behavior and use of a control, you need to know a control's public interface, or its API. Because a control is written ...

Get Adobe® Flex® 3 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.