PDA

View Full Version : Right align some buttons in grid toolbar: How?



Mango_lier
23 Oct 2007, 3:08 PM
Ext.Newbie question.
I would like to add a textfield and a button in the Grid toolbar, for searching within the record listed in the grid. Using some of the excellent examples here I was able to do that. However, I would like the textfield and the search button right aligned and the rest of the buttons like Add/Edit/Delete on the left. All my experiments have failed:((.

Can someone please post few lines to show how that can be done.

Regards.

techbug
23 Oct 2007, 4:05 PM
yourGridPanel.getTopToolbar().add('->', {
text: 'Disable',
handler: function(){
action.setDisabled(!action.isDisabled());
this.setText(action.isDisabled() ? 'Enable' : 'Disable');
}
});

Mango_lier
23 Oct 2007, 7:36 PM
Thanks, -> is the key