PDA

View Full Version : [CLOSED] Dynamic add Tab, not set the same theme...



gs_user
Aug 20, 2012, 8:34 AM
Hi,

I use setTheme to change theme, click tree node dynamic add tab
the tab theme not same with parent tab.
How to resolve it??

The code was add tab dynamic.
How to get theme and set the tabpanel the same theme?


<script type="text/javascript">
var addTab = function (tabPanel, record) {
if (record.isLeaf()) {
var tab = tabPanel.getComponent(record.getId());
if (!tab) {
tab = tabPanel.add({
id: record.getId(),
title: record.get('text'),
closable: true,
loader: {
url: record.getId(),
renderer: "frame",
loadMask: {
showMask: true,
msg: "Loading " + record.get('text') + "..."
}
}
});
}

tabPanel.setActiveTab(tab);
}
}

Vladimir
Aug 20, 2012, 1:13 PM
Hi,

Please provide a code how do you set a theme on the server.
Each page on the server should know which theme need to use.

For example, you can use the following code on the server


this.Session["Ext.Net.Theme"] = Ext.Net.Theme.Gray;


In this case, each page will use new theme automatically