I have a container object in view port, i set the layout 'fit', then i render a toolbar to this container, when this container is rendering, i put these codes in this event:

Ext.create('Ext.toolbar.Toolbar', {
renderTo: 'cntMainMenu',
items: [
{
xtype: 'button',
text: 'Panel Show'
},
{
xtype: 'button',
text: 'Temp Show'
}
]
});

This toolbar's buttons can not be loaded successfully. When I set toolbar's width attribute a exact number, these buttons be loaded successfully, but this container is not be filled 100 percent, what can do ?

02.png