O'Reilly logo

ExtGWT Rich Internet Application Cookbook by Odili Charles Opute

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

Switching themes at runtime

The GXT system provides a handy way of switching/changing themes dynamically or at runtime, instead of having to always do it in code and recompile to see it in action. Runtime theme switching is done with a ThemeSelector widget, which is actually a ComboBox extension.

It presents to the user the available themes provided by (and registered with) the ThemeManager, such that the user can then select any theme from the list and have it applied immediately.

The following screenshots show the ThemeSelector widget and the result of selecting the Access theme on a component:

Switching themes at runtime

How to do it...

Create a ThemeSelector widget and place ...

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