Accessibility
Adobe
Sign in My orders My Adobe

Flex Documentation

Displaying images in a List-based control


Table of Contents

  1. Displaying images in a List-based control
  2. Validating data in a List-based control
  3. Formatting data in a List-based control
  4. Creating a DataGrid header renderer
  5. Creating a Tree row renderer

Sometimes images convey information better than words, and there may be times when you want to use images in the cells of a List-based control. Incorporating images into a custom cell renderer requires very little code beyond what is needed for a basic cell renderer. In a cell renderer class, you use [Embed...] metadata tags to embed images into variables at compile time. You then display the images by creating an mx.controls.Image object that uses the embedded images as the value of its source property.

The following figure shows a DataGrid that displays text in one column and images in another column. The first column uses a standard CellRenderer object. The second column uses a custom CellRenderer object to display images.

Hello World application.