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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,060
    Answers
    3976
    Vote Rating
    1389
      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
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    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
  •