-
9 Dec 2011 10:35 AM #1
Answered: toolbar in tabpanel
Answered: toolbar in tabpanel
I tried to put a toolbar inside a tabpanel but there used to be a "dockedItems" property which is not longer valid, so if i put the toolbar in the "items" then it counts as another tab, I can't find any way to do what I want in the docs, anyone wanna point me in the right direction?
-
Best Answer Posted by rdougan
The following code provides the expected result in PR2:
Code:Ext.setup({ onReady: function() { Ext.Viewport.add({ xtype: 'tabpanel', items: [ { xtype: 'toolbar', docked: 'top', ui: 'light', title: 'Tab Panel' }, { xtype: 'panel', title: 'Hello', html: 'First panel' }, { xtype: 'panel', title: 'Two', html: 'First panel' } ] }); } });
-
9 Dec 2011 11:05 AM #2
Code:items: [ { xtype: 'toolbar', docked: 'top' } ]Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
9 Dec 2011 11:30 AM #3
yeah, that's what I tried, and then the first tab in the tabpanel was a giant toolbar.
-
9 Dec 2011 11:34 AM #4
The following code provides the expected result in PR2:
Code:Ext.setup({ onReady: function() { Ext.Viewport.add({ xtype: 'tabpanel', items: [ { xtype: 'toolbar', docked: 'top', ui: 'light', title: 'Tab Panel' }, { xtype: 'panel', title: 'Hello', html: 'First panel' }, { xtype: 'panel', title: 'Two', html: 'First panel' } ] }); } });
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
9 Dec 2011 11:37 AM #5
hm, that's what I did but with the tabBarPosition: 'bottom', I will rewrite it and check it out, thanks.
-
9 Dec 2011 11:38 AM #6

Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
10 Dec 2011 12:48 PM #7
it was the xtype property I was missing on the remaining items, without the toolbar they work fine, but with the toolbar, it needs to be defined on those too. Thanks.


Reply With Quote