Hybrid View
-
9 Jul 2012 9:27 PM #1
Unanswered: Why my TabPanel like this ?
Unanswered: Why my TabPanel like this ?
TabPanel panel = new TabPanel();
panel.setBorders(false);
TabItem item1 = new TabItem("Hello World 1");
item1.addText("Hello...");
item1.addStyleName("pad-text");
TabItem item2 = new TabItem("Hello World 2");
item2.addText("... World!");
item2.addStyleName("pad-text");
panel.add(item1);
panel.add(item2);
The page like this:
2012-7-10 13-23-16.png2012-7-10 13-23-54.png
Why there has a line in the active TabPanel?
but when i add panel.setPlain(true);
the effect like this:
2012-7-13 11-50-39.png
Why?
-
8 Sep 2012 7:22 AM #2
have the same problem
have the same problem
as mentioned --- I got four panels A, B, C and D ... Don't know why, but in front (on init) is panel B ... can someone help?
-
8 Sep 2012 8:39 AM #3
SOLVED
SOLVED
Just try to give an ID to your TabPanel - in my example named "MyTabPanel", given ID "MyTabPanel"...
got one window 4 panels in it, window without ID, tabpanel with ID "MyTabPanel"
write to console
Ext.getCmp('MyTabPanel').setActiveTab(0); //for first tab
Ext.getCmp('MyTabPanel').setActiveTab(2); //for third tab etc.
OR
if you want to do it by default (i.e. whenever you open your project preview) just put into tabpanel options (in Designer - lower right side by default) "activeTab" to 0 (or any other number) ... more info is hereCode:http://docs.sencha.com/ext-js/4-1/#!/api/Ext.tab.Panel-cfg-activeTab
-
18 Sep 2012 1:10 AM #4
Thanks!
but TabPanel has setSelection,not setActiveTab.


Reply With Quote