PDA

View Full Version : size of buttons in table layout



TheMonolith
1 Mar 2010, 7:24 AM
With the following code I'm arranging 4 buttons into 2 columns and 2 rows:


{
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:


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


{
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...

mitchellsimoens
1 Mar 2010, 3:41 PM
there are 3 different scales... small (16px high)(default), medium (24px high), large (32px high)

TheMonolith
2 Mar 2010, 12:57 AM
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"?

mitchellsimoens
2 Mar 2010, 6:43 AM
I've always wondered the same thing, especially since it even says it in the API docs