PDA

View Full Version : Problem layout height in child panel when parent panel dock toolbar



nukboon
20 Jan 2012, 10:26 AM
Ext.create('Ext.panel.Panel',{
renderTo: Ext.getBody(),
height: 300,
//width: 400, //when we defined width it's no problem!
layout: {
type: 'border',
padding: 5
},
dockedItems: [{// try to remove dock to see different
xtype: 'toolbar',
dock: 'top',
height: 60,
defaults: {
scale: 'medium',
iconAlign: 'top',
},
items: [{
xtype: 'tbtext',
text: 'xxxx'
}]
}],
//child's height is wrong when use toolbar
items: [{
xtype: 'panel',
region: 'west',
title: 'aaaa',
width: 200
},{
xtype: 'panel',
region: 'center',
html: 'South Central'
}]
});.

mitchellsimoens
20 Jan 2012, 11:42 AM
What is the height of the child? Should be 300 - 60

nukboon
21 Jan 2012, 12:29 AM
Height is 300 but when we add width config in parent panel it be 300-60
Please try my sample code