我有一個帶有標題的Ext.js容器,標題包含文本作爲其標題和圖標。用於刷新選項卡。我如何獲得該容器標題的圖標點擊事件? 我使用icon: '@Url.Content("~/Images/icon-supp.png")',
獲取文本旁邊的圖標。 這裏是我的代碼:如何給Ext.js中的圖標添加點擊事件
'TabChange'也僅在選項卡被更改而不是點擊圖標時激活。
更多信息:我有一箇中心容器。林添加Ext.tab.Panel給它,它有
items: [
{
xtype: 'container',
title: 'FooText',
id: 'FooPanel',
icon: '@Url.Content("~/Images/icon-refresh.png")',
tools: [{
type: 'help',
handler: function(){
//Doesnt hit on click of tab
}
}, {
itemId: 'refresh',
type: 'refresh',
hidden: true,
handler: function(){
//Doesnt hit on click of tab
}
}
}],
listeners: {
activate: function() {
//This just hits only once when that tab gets activated./
alert('you clicked me');
},
click:function(){//Doesnt work},
},
handler:function(){//Doesnt work},
autoScroll: true,
},
現在我需要的是對圖像圖標點擊一個亨德爾事件。可能嗎 ?
你確定是這個ExtJS的?或Ext.Net? – JChap
你可以添加更多的代碼嗎? –
對不起,您是否在嘗試爲視圖執行刷新按鈕?版本的extjs? –