Apr 05, 2014, 9:30 PM
Issues with TabPanel, UI and TabConfig
Hi,
I have tried adding the following listener to a tabPanel (call myTabPanel):
As well, I think (specially for the "default" UI) it is quite hard to distinguish if a tab is selected or not : would be nice to have a build in possibility to set UI ONLY for the currently selected tab in tabpanel.
I also must say that if we add several tabs in the tabPanel, the first one is selected by default : this is normal... BUT the "look" does not show it :
here are 2 images :
The firt image is when page has just loaded, and no tab whas clicked.
second is after a click on first tab.
From my point of view, first image is not normal : panel shows the content of the first added tab... so tab should be selected.
As well, i use this trick i found in the examples:
All this just to say it really would be a nice feature if Ext.net could create some kind of options in tabPanl (or tabConfig) so that:
- selected tab could automatically have a sepcific UI
- selected tab could be more visible : the x-tab-bar trick could maybe as well be automatically added.
Anyway, back to my current problem : any idea why my first javascript does not work ?
thanks!
I have tried adding the following listener to a tabPanel (call myTabPanel):
var niceSelectTab = function (item, newTab, oldTab) {
if (oldTab != null) {
oldTab.tabConfig.ui = 'default';
}
newTab.tabConfig.ui = 'success';
}
The listener is actually called, but UI is never changed, and no error is thrown.As well, I think (specially for the "default" UI) it is quite hard to distinguish if a tab is selected or not : would be nice to have a build in possibility to set UI ONLY for the currently selected tab in tabpanel.
I also must say that if we add several tabs in the tabPanel, the first one is selected by default : this is normal... BUT the "look" does not show it :
here are 2 images :
The firt image is when page has just loaded, and no tab whas clicked.
second is after a click on first tab.
From my point of view, first image is not normal : panel shows the content of the first added tab... so tab should be selected.
As well, i use this trick i found in the examples:
var tabChange = function (tabPanel, newCard, oldCard) {
if (oldCard.tabConfig && oldCard.tabConfig.ui != "default") {
tabPanel.getTabBar().removeCls("x-tab-bar-" + oldCard.tabConfig.ui);
}
if (newCard.tabConfig && newCard.tabConfig.ui != "default") {
tabPanel.getTabBar().addCls("x-tab-bar-" + newCard.tabConfig.ui);
}
};
It makes selected tabPanel more easy to identify for the user... in the examples it does work because the first panel has default UI... but if first panel has any other UI in tabconfig... then it does not work until the user changes tab...All this just to say it really would be a nice feature if Ext.net could create some kind of options in tabPanl (or tabConfig) so that:
- selected tab could automatically have a sepcific UI
- selected tab could be more visible : the x-tab-bar trick could maybe as well be automatically added.
Anyway, back to my current problem : any idea why my first javascript does not work ?
thanks!