1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    75
    Vote Rating
    -1
    bareflix is an unknown quantity at this point

      0  

    Default how do I make a table layout's parent grow to hold the table's natural size?

    how do I make a table layout's parent grow to hold the table's natural size?


    I'm still missing something about layouts. Sometimes things grow to hold their children at their natural size, but other times children get truncated. Here's an example. I have a form with a fieldset using a table layout. The table layout does exactly what I want, but the parent clips it on the right edge rather than growing to hold the whole child.
    Is there a setting for the parent or child to change this?

    dialog.png
    Code:
            var keyview = new Ext.form.FieldSet (
            {
                title: 'sample field set',
                layout: 'table',
                layoutConfig:
                {
                    columns: 5
                },
    
                items:
                [
                    {colspan: 5, xtype: "label", text: 'Long string of text that will wrap if necessary, thats ok and expected'},
                    {xtype: "button", text: 'Download file'},
                    {xtype: "button", text: 'Download file2'},
                    {xtype: "button", text: 'Upload file',},
                    {xtype: "button", text: 'View file'},
                    {xtype: "button", text: 'Test file'},
                ]
            });
    
        var panel = new Ext.FormPanel (
        {
            labelAlign: 'right',
            frame:true, 
            defaultType:'textfield',
            monitorValid:true,
    
            items:
            [
                { 
                    fieldLabel:'field 1', 
                },
                { 
                    fieldLabel:'field 2', 
                    xtype: 'checkbox'
                },
                keyview
            ]
        });
    
        var win = new Ext.Window(
        {
            title:'Settings', 
            closable: false,
            resizable: false,
            plain: true,
            border: false,
            items:
            [
                panel
            ]
        });
    
        win.show();

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,505
    Vote Rating
    52
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Code:
    var keyview = new Ext.form.FieldSet ({
        title: 'sample field set',
        layout: 'table',
        autoWidth: true,
        layoutConfig: {
            columns: 5
        },
        items:[
            {colspan: 5, xtype: "label", text: 'Long string of text that will wrap if necessary, thats ok and expected'},
            {xtype: "button", text: 'Download file'},
            {xtype: "button", text: 'Download file2'},
            {xtype: "button", text: 'Upload file',},
            {xtype: "button", text: 'View file'},
            {xtype: "button", text: 'Test file'},
        ]
    });
    var panel = new Ext.FormPanel ({
        labelAlign: 'right',
        frame:true, 
        defaultType:'textfield',
        monitorValid:true,
        items:[{ 
            fieldLabel:'field 1', 
        }, { 
            fieldLabel:'field 2', 
            xtype: 'checkbox'
        }, keyview]
    });
    new Ext.Window({
        title:'Settings',
        border: false,
        items: panel
    }).show();

Similar Threads

  1. how to get size of table layout in a window or viewport
    By jerrel in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 21 Mar 2010, 9:40 AM
  2. size of buttons in table layout
    By TheMonolith in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 2 Mar 2010, 6:43 AM
  3. Layout is not fitting in the table(need to make the layout sit in <td>).
    By sivaprasad in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 16 Nov 2009, 8:32 AM
  4. [FIXED] Table Layout / ComboBox - How to make them play nicely
    By prgmmr in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Sep 2009, 6:22 AM
  5. How to make XmlTablePage fit in full size of table panel
    By budhimind in forum Ext GWT: Help & Discussion (1.x)
    Replies: 8
    Last Post: 3 Jul 2008, 12:28 AM

Thread Participants: 1