Results 1 to 3 of 3

Thread: Ext.tab.Panel and flex

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    82
    Answers
    4
    Vote Rating
    3
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    82
    Answers
    4
    Vote Rating
    3
      0  

    Default Thank you

    Yes, that worked!

    Thank you very much

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •