I have a checkitem menu and I want to add icons to each menu item, so I inserted each icon after the menu item is rendered.
peace of my code:
{ xtype: 'menucheckitem',
text: 'First Arrow'
listeners: {
render: {
fn: me.onMenucheckitemRender,
scope: me
}
}
}
onMenucheckitemRender: function (abstractcomponent, options)
{
Ext.DomHelper.insertAfter(abstractcomponent.getEl().down(".x-menu-item-icon"), {
tag: 'img',
src: "icons/arrow1.png"
});
}
This works just fine, but since I will need it many times with different icons, I would like to know how to create a subclass so I can reuse this functionality.
Thank you