-
28 Aug 2012 4:59 AM #1
Answered: Ext.tab.Panel and flex
Answered: Ext.tab.Panel and flex
Hi there,
I have a Tab Panel defined as follows:
What I want to do is make the height of each tab within it flush with the height of the screen so that theu are each 20% of the total height, so with different devices we have no gaps at the bottom of the screen or the Tabs don't get cut off.Code:var mainpanel = Ext.define("Application.view.Main", { extend: 'Ext.tab.Panel', xtype: 'mainpanel', config: { fullscreen: true, layout: { animation: 'fade' }, tabBarPosition: 'left', items: [ { xtype: 'homepanel' }, { xtype: 'placespanel' }, { xtype: 'topicspanel' }, { xtype: 'socialpanel' }, { xtype: 'settingspanel' } ] } });
Is it possible to do this and if so, how can it be done ?
Thanks,
Matt
-
Best Answer Posted by mitchellsimoens
Try this:
Code:Ext.define('Application.view.Main', { extend : 'Ext.tab.Panel', xtype : 'mainpanel', config : { fullscreen : true, layout : { type : 'card', animation : 'fade' }, tabBar : { docked : 'left', defaults : { flex : 1 } }, items : [ { xtype : 'homepanel' }, { xtype : 'placespanel' }, { xtype : 'topicspanel' }, { xtype : 'socialpanel' }, { xtype : 'settingspanel' } ] } });
-
30 Aug 2012 4:32 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,119
- Vote Rating
- 453
- Answers
- 3160
Try this:
Code:Ext.define('Application.view.Main', { extend : 'Ext.tab.Panel', xtype : 'mainpanel', config : { fullscreen : true, layout : { type : 'card', animation : 'fade' }, tabBar : { docked : 'left', defaults : { flex : 1 } }, items : [ { xtype : 'homepanel' }, { xtype : 'placespanel' }, { xtype : 'topicspanel' }, { xtype : 'socialpanel' }, { xtype : 'settingspanel' } ] } });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.
-
6 Sep 2012 1:10 PM #3
Thank you
Thank you
Yes, that worked!
Thank you very much


Reply With Quote