Using ExtJS 3.4 - I have a formpanel which lays out three buttons in a row. I believe the right way to do this is to nest item blocks, code shows what I am doing.
var myPanel = new Ext.form.FormPanel({
id:'myPanel',
height:300,
width: 800,
items:[{
layout : 'column' ,border:false,buttonAlign : 'left', bodyStyle : 'padding:15px 20px 0',
items:[{
layout:'column' , border:false,
items:[saveSelectedButton, deleteSelectedButton, cancelButton ]
}]
}]
});
What I really need to do is add the buttons dynamically so the items block is empty at first items:[]
and then I call
myPanel.add(saveSelectedButton, deleteSelectedButton, cancelButton);
but the buttons are rendered in a column, any suggestions?
Usage of
buttons
instead ofitems
is more preferred way.For adding them dynamically you should use
addButton
method. E.g.