O'Reilly logo

Adobe® Flex® 3 Bible by David Gassner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required