View Full Version : Setting a theme
29 Aug 2011, 2:07 AM
From what I read, the setting of the theme for an application is done only in the Entrypoint class. I tried setting it in other places, but it had no effect.
Is there any way I can set it somewhere else except the Entrypoint? Because I am loading some user preferences and the loading does not take place in the Entrypoint.
Thanks in advance,
30 Aug 2011, 5:55 AM
I use a menu for setting the style. The styles can be changed at any time.
This is how I do the chage:
Where newThemeUrl contains the path to one of the gxt css files (gxt-all.css, gxt-gray.css, or xtheme-slate.css, for example).
30 Aug 2011, 10:29 AM
Thank you for the answer, but I was looking for a Java code sample for this.
30 Aug 2011, 11:09 PM
That is exactly what I pasted you...
CSS is a GXT class.
31 Aug 2011, 12:27 AM
Yes, you are right, it is a GWT class. But now my question would be: how to link the "id" that has to be passed to the remove and add stylesheet methods to the actual path of the .css file? I see that the add method has a url in its parameter list, but how does the remove know what to remove?
Thanks in advance
31 Aug 2011, 12:38 AM
"gxt_theme" is the id used by gxt... so simply stick with that.
Removing the style "gxt_theme" will remove the current theme.
Simply then add the new one using also that id.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.