PDA

View Full Version : buttons with custom attributes



nofx
25 Aug 2011, 4:31 AM
Hi,

I have alot of buttons on a panel and i would like to know which button was pressed. I'm already catching that event with the handler(button) option.

But i need to know more about the button. Is it possible to add custom options/attributes to the button so i can retrieve those later when the button is pressed? Something like:



new Ext.Button({
text: cells[i].value,
width: size,
height: size,
my_custom_attr: 'some value'
}));

vivendi
27 Aug 2011, 2:36 PM
Hi, i would like to know if this is possible as well.

Did you find a solution? Or can anyone else tell me if it's possible?

bharatn
27 Aug 2011, 9:42 PM
Yes that will work