1
votes

I define a 'panel' extend: 'Ext.form.Panel' that has a tbar with three buttons.
when my other work done i want my 3nd button on tbar must click to do some task.
I don't want create a new function with same task like panel.myfunction().
Any way to do that thanks

2
Please rewrite your question because it can hardly be told what your goal it. - sra
I still don't understand what your goal is? Can you post some code? - sra
Maybe, did you want a Handler on botton ? docs.sencha.com/extjs/4.0.7/#!/api/… - mfruizs2
example I want call button like function like panel.tbar[3].click :( - DeLe
this link can help you: sencha.com/forum/… - mfruizs2

2 Answers

2
votes

I think this may be close to what you want:

panel.down("toolbar").items.items[3].handler();

If you really want the third visible button, I think instead of 3 you should be using 2 for the array index:

panel.down("toolbar").items.items[2].handler();
1
votes
var button = this.down('button[action=save]');
button.fireEvent('click', button);