O'Reilly logo

Learning Ext JS - Fourth Edition by Armando Gonzalez, Crysfel Villa, Carlos A. Méndez

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

Different styles for the same component

In an application, it's common to have different styles of buttons, windows, panels, and so on. For example, in our application, we can define different styles for a panel (according to the type of data we are going to show in there) and different styles for the toolbars inside panels, or for different types of buttons.

In this case, the ui property is essential for this kind of task. Every widget in Ext JS has a ui property, which contains prefixes for the CSS classes. In this way, we can define specific classes for every component. In the following exercise, we are going to create the dashboard for our application and give a custom ui property to each one of the panels inside the dashboard.

Our layout for ...

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