Results 1 to 4 of 4

Thread: [HELP] - Table Layout width of children

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Amsterdam, The Netherlands
    Posts
    245
    Vote Rating
    6
      0  

    Default [HELP] - Table Layout width of children

    Hi All,
    I'm trying a very small example with table layout (it needs to be this because the client will configure it) and it seems like the panels inside don't share the same width amongst them.

    Code:
    var newPanel = new Ext.Panel({
            title : 'Test',
            layout : 'table',
            defaults : {
                bodyStyle : 'height: 250px'
            },
            layoutConfig : {
                columns : 2,
                rows : 1,
                tableAttrs : {
                    style : {
                        width : '100%'
                    }
                }
            },
            items: [
            {
                xtype: 'panel',
                title: 'Test 1'
            },
            {
                xtype: 'panel',
                title: 'Test 21111111111'
            }
            ]
        });
    This produces the following:

    test.jpg

    So instead of sharing the same width it seems like the second panel gets much more width because the title is bigger.
    I cannot set the width manually because I want it to resize properly and as said before I cannot change the layout to vbox and hbox.

    Can someone help me here?

    Thanks!

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,318
    Vote Rating
    1291
      0  

    Default

    That's because the items don't have a width. You have to specify a width.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Amsterdam, The Netherlands
    Posts
    245
    Vote Rating
    6
      0  

    Default

    Correct, but I wanted the width to be dynamic, similar to what is there in hbox/vbox and to resize properly.

    Isn't this possible?

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,318
    Vote Rating
    1291
      0  

    Default

    Not in table layout.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

Posting Permissions

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