1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    82
    Answers
    4
    Vote Rating
    3
    matfin is on a distinguished road

      0  

    Default Answered: Ext.tab.Panel and flex

    Answered: Ext.tab.Panel and flex


    Hi there,

    I have a Tab Panel defined as follows:

    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'
                }
            ]
        }
    });
    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.

    Is it possible to do this and if so, how can it be done ?

    Thanks,

    Matt

  2. 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'
                }
            ]
        }
    });

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    82
    Answers
    4
    Vote Rating
    3
    matfin is on a distinguished road

      0  

    Default Thank you

    Thank you


    Yes, that worked!

    Thank you very much

Thread Participants: 1

Tags for this Thread