PDA

View Full Version : How do I shrinkWrap some buttons?



worthlutz
16 Jan 2013, 7:56 AM
I cannot get a container (or a toolbar) to shrink around my buttons.



Ext.define('MyApp.view.MyPanel', {
extend: 'Ext.panel.Panel',

height: 250,
width: 400,
layout: {
type: 'absolute'
},
bodyBorder: false,
title: 'My Panel',

initComponent: function() {
var me = this;

Ext.applyIf(me, {
items: [
{
xtype: 'container',
x: 10,
y: 20,
shrinkWrap: 3,
style: {
backgroundColor: 'red'
},
items: [
{
xtype: 'button',
text: 'MyButton'
},
{
xtype: 'button',
text: 'MyButton'
},
{
xtype: 'button',
text: 'MyButton'
}
]
}
]
});
me.callParent(arguments);
}
});


What am I missing?

Worth