May 20, 2013, 11:35 AM
[CLOSED] Change theme of Gridpanel when theme is changed
Hi,
When I change the theme of application, it changes them of all other components except windows. How do I change the theme of window as well. I have used following script in javascript like this.
When I change the theme of application, it changes them of all other components except windows. How do I change the theme of window as well. I have used following script in javascript like this.
var themeChange = function (menu, item, e, eOpts) {
debugger;
App.direct.GetThemeUrl(item.text, {
success: function (result) {
Ext.net.ResourceMgr.setTheme(result);
var mainPanel = Ext.getCmp("pnlComp");
mainPanel.items.each(function (el) {
if (!Ext.isEmpty(el.iframe)) {
if (el.getBody().Ext) {
el.getBody().Ext.net.ResourceMgr.setTheme(result, item.text.toLowerCase());
}
}
});
mainPanel.doLayout();
}
});
};
I tried to implement this as well. But it says ExampleTabs is undefined. ExampleTabs.items.each(function (el) {
if (!Ext.isEmpty(el.iframe)) {
if (el.getBody().Ext) {
el.getBody().Ext.net.ResourceMgr.setTheme(result, menuItem.text.toLowerCase());
}
}
});
Last edited by Daniil; May 28, 2013 at 4:12 AM.
Reason: [CLOSED]