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

Aug 20, 2012, 7:34 AM

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') + "..."


Aug 20, 2012, 12:13 PM

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