-
29 Nov 2011 6:37 PM #1
Tabbar skipping my view.
Tabbar skipping my view.
If I setActiveItem on a view port and use the same view later in a tabbar, the tabbar skips my view and goes to the next item in the tabbar do i need to remove it first from the other viewport? if so how?
-
30 Nov 2011 8:21 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Not sure I follow 100%. I have tried this code with expected behavior:
Code:var tabpanel = Ext.create('Ext.tab.Panel', { fullscreen : true, items : [ { title : 'One', html : 'one' }, { title : 'Two', html : 'two' }, { title : 'Three', html : 'three' } ] }); setTimeout(function() { tabpanel.setActiveItem(1); //manually switch to tab 3 after it switches to the 2nd tab }, 1000); setTimeout(function() { tabpanel.setActiveItem(0); }, 5000);Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
30 Nov 2011 9:11 AM #3
Its more like if i have
var viewport1 = new Ext.panel()
then a tabpanel
var viewport2 = new Ext.tabpanel({
items: [
view1,view2,view3
]});
then i try to attach view2 to viewport1,
viewport1.setActiveItem(view2);
when i try to access view2 from viewport2 via the tabbar it skips to view3.
-
1 Dec 2011 3:46 PM #4
You can't have the same view in 2 different containers. This will cause issues (like you are are experiencing).
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.


Reply With Quote