Reputation: 355
I have added a float container and inside it i have added a component,as shown below,
var me = this;
var lastTab = me.getLastTabInTabPanel();
var iconContainer = me.down('#iconContainer');
if (iconContainer == null) {
iconContainer = Ext.create('Ext.panel.Panel', {
id: 'iconContainer',
floating: true,
shadow: false,
listeners: {
click: this.valIconClicked,
scope: this
},
style: 'margin-left:280px;',
items: [
{
xtype: 'component',
id: 'valIcon',
cls: 'valuation-tool-specview',
height: 33,
width: 26,
listeners: {
click: this.valIconClicked,
scope: this
}
}
]
});
}
iconContainer.showBy(lastTab, 'tl-tr');//, [-2, 0]
click event is not getting fired, did i miss anything?
Upvotes: 1
Views: 132
Reputation: 3480
Components don't have a click event. But you can attach a listener to their element's click like this:
listeners: {
click: {
element: 'el',
scope: this,
fn: this.valIconClicked
}
}
Upvotes: 3