Forum /
Ext GWT Community Forums (1.x) /
Ext GWT: Help & Discussion (1.x) /
Default Theme
Default Theme
How set the default theme , with Slate ?
Ext GWT Premium Member
you have to do a few things... the explorer sample has it all, but a quick outline is...
1) add <inherits name='com.extjs.gxt.themes.Themes' /> to your module xml
2) add ThemeManager.register(Slate.SLATE); to somewhere early in ya code (before rendering)
3) add the ThemeSelector() as a component
I've not yet figured out how you set the default (ie first) theme... so far it seems to always be the blue theme and that becomes forced...
I guess a future improvement could be a ThemeManager interface where is queries for available themes and what to do for default, order shown etc...
thanks for your reply.
But , I want set the theme the first , on slate theme.
I tested this : GXT.defaultTheme = Slate.SLATE; in the firsrt line on my module , but nothing's
Ext GWT Premium Member
I know - it doesn't seem to work and I'm not sure why?
Sencha - GXT Dev Team
defaultTheme was busted when the new Theme module was created. GXT.defaultTheme is now removed and replaced with GXT.setDefaultTheme(Theme theme, boolean force). Just call this in the first line of onModuleLoad. The force parameter determines if the users previously save theme (via cookies) should be respected. Change is in SVN and will go out in beta 3.
thanks for your reply.
I've just downloaded beta 3 , it's works , thanks.
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us