O'Reilly logo

Ext JS 3.0 Cookbook by Jorge Ramon

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

Using templates to change the look of combo box items

A combo box allows you to control the look of its items. In this recipe, the Movies Browser uses a ComboBox instance to display movie titles, as shown in the following screenshot:

Using templates to change the look of combo box items

The user experience can be enhanced by displaying not just the title, the year, the rating, but also the description of the movie as shown in the following screenshot:

Using templates to change the look of combo box items

How to do it...

  1. Create the styles needed for the combo's items:
    <style type="text/css"> .movie-item { font: normal 12px tahoma, arial, helvetica, sans-serif; ...

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