0
var enableBtn = Ext.create('Ext.button.Button', {
text : 'Edit Label',
disabled: false,
scope : this,
handler : function() {
//disable the enable button and enable the disable button
//enableBtn.disable();
//disableBtn.enable();
//enable the toolbar
//toolbar.enable();
tFieldPage.setText('7');
}
});
var tFieldPage = new Ext.form.Label({
text: 1
});
var toolbar = Ext.create('Ext.toolbar.Toolbar', {
//renderTo: document.body,
//width : 400,
enableOverflow: true,
margin : '5 0 0 0',
items : [enableBtn, tFieldPage]
});
Ext.create('Ext.window.Window', {
title: 'Standard',
closable: false,
height:250,
width: 500,
bodyStyle: 'padding:10px',
//contentEl: 'content',
scrollable: true,
tbar: toolbar
}).show();
我使用的是ExtJS 5.0.1,我發現當您縮小窗口並且標籤'1'進入溢出菜單時,當我按下按鈕更新標籤,它不會更新。但是,當我展開工具欄時,標籤會再次更新。經過檢查,我意識到當溢出時,會自動創建另一個標籤。如何獲取我創建的原始組件,以便在溢出菜單中更新克隆的組件?ExtJS 5工具欄中的標籤在溢出時未更新
我測試如上所述使用煎茶撥弄和相同的錯誤代碼顯示爲好。任何建議或者這是一個框架問題?
編輯:我的小提琴鏈接:https://fiddle.sencha.com/#view/editor&fiddle/1nc7
感謝。
會更好。 – abeyaz
嗨,我已經添加了小提琴鏈接。 – user1679887
看起來像是extjs5中的一個bug。如果你在extjs6小提琴上嘗試它,你會發現它正在工作。你可以做的是要麼開始使用extjs6這是非常相似的V5,或者你可以比較兩個版本的'Ext.layout.container.boxOverflow.Menu'類的源代碼,並查看您的問題缺少/越野車的一部分。然後你可以很容易地覆蓋它。 – abeyaz