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 17. Using list controls

Most Flex applications are designed for the purpose of presenting and managing data in some form. As a result, one of the most popular families of visual controls in the Flex framework includes those known as list controls.

A list control is defined as a component that has a dataProvider property that allows you to populate the control with dynamic data. The data provided to a list control can be in the form of either hierarchical or relational data, and the type of data you want to present frequently determines which control you use. In addition to being able to display relational or hierarchical data, list controls have a common set of properties, methods, and events that allow the user to select one or more items with mouse and keyboard gestures.

The mx.controls. List component is the most fundamental of these controls. This component behaves like an HTML >select< control and displays a list of data items to the user as a list box. After you learn how to use the List control, you have most of the information you need to use other such controls. You can populate controls with data, listen for events indicating that the user has selected or started to drag data, set common styles, and so on.

Note

This chapter describes use of the single column list controls: List and ComboBox. It includes information on how to populate these controls with data, how to control data presentation with custom generation of item labels and renderers, and how to handle events ...

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