PDA

View Full Version : Buttons position on the panel



quintino
18 May 2010, 6:33 AM
Hi All,
i've this little problem :
i want to position 2 buttons in the panel, but one must be in the rigth side of the panel and the other on the left side using the buttons configuration :


buttons : [
{
text : 'Pulisci',
id : 'reset_ricerca_avanzata',
handler : function(){
//CODE

// Ripristino il colore del pannello della ricerca avanzata
if(Ext.get('ricerca-xcollapsed')) {
Ext.get('ricerca-xcollapsed').dom.style.backgroundColor = '#D2E0F2';
}
},

},
{
text : 'Ricerca',
iconCls: 'icon-find',
handler : function(){
var b = Ext.getCmp('btnRicerca');
b.focus();
b.handler.call(b.scope || b, b);
},

}
]




thank you for your help and sorry my bad English :D

quintino
18 May 2010, 6:59 AM
I 've solved the problem.

This is the right code :


buttonAlign : 'left'
buttons : [
{
text : 'Pulisci',
id : 'reset_ricerca_avanzata',
handler : function(){
//CODE

// Ripristino il colore del pannello della ricerca avanzata
if(Ext.get('ricerca-xcollapsed')) {
Ext.get('ricerca-xcollapsed').dom.style.backgroundColor = '#D2E0F2';
}
},

},new Ext.Toolbar.Fill(),
{
text : 'Ricerca',
iconCls: 'icon-find',
handler : function(){
var b = Ext.getCmp('btnRicerca');
b.focus();
b.handler.call(b.scope || b, b);
},

}
]