Results 1 to 4 of 4

Thread: size of buttons in table layout

  1. #1
    TheMonolith
    Guest

    Question size of buttons in table layout

    With the following code I'm arranging 4 buttons into 2 columns and 2 rows:

    Code:
    {
    xtype:"panel",
    layout:"table",
    layoutConfig:{
      columns:2
    },
    defaults:{
      bodyStyle:"padding:5px;",
      style:"margin:10px;",
    },
    items:[{
        xtype:"button"
      },{
        xtype:"button"
      },{
        xtype:"button"
      },{
        xtype:"button"
      }]
    }
    However, I have not yet figured out how to explicitly set the size (width and height) of the buttons. Specifying the width and height for each button doesn't do anything - in other words:

    Code:
    {
        xtype:"button"
    }
    has the same effect as

    Code:
    {
        xtype:"button",
        width: "100"
    }
    Why?

    So far I have looked up Ext.Button and Ext.layout.TableLayout in the API documentation, googled "Ext button size table layout" and glimpsed at Saki's examples but didn' find an answer...

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    there are 3 different scales... small (16px high)(default), medium (24px high), large (32px high)
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    TheMonolith
    Guest

    Default

    Thanks for the reply. It showed me that I can scale the button image (in the API docs it says "button element" and I didn't know what was meant by that).

    But why I can I not adjust the size of the button itself by using "width" and height"?

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    I've always wondered the same thing, especially since it even says it in the API docs
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

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