PDA

View Full Version : Addtional item in a panel head?



jaisonjames
12 Sep 2010, 10:29 PM
22350I need to add a title and combo box in a panel head (Screenshot attached), Can somebody help me?

Condor
12 Sep 2010, 11:28 PM
You would need to render the combobox to the panel header and adjust some styles to make it show correctly, e.g.

new Ext.Panel({
title: 'Hello',
width: 300,
height: 200,
listeners: {
render: function(p){
var c = new Ext.form.ComboBox({
store: ['One', 'Two', 'Three'],
value: 'One',
renderTo: p.header,
width: 100
});
p.header.child('.x-panel-header-text').applyStyles('float:left;');
c.wrap.applyStyles('float:left;');
}
},
renderTo: Ext.getBody()
});

jaisonjames
13 Sep 2010, 1:17 AM
Working fine Thanks... :)