我有以下内容:
var panel = headerPanel.add({
id: 'recentcommands_button_id',
xtype: 'button',
text: "Recent Commands",
tooltip: "Sample Tooltip Text"
});
随后是:
Ext.getCmp('recentcommands_button_id').tooltip = "TEST";
如果我检查按钮的属性,它会正确设置工具提示值,但实际上不会更改屏幕上的值。
我尝试使用:
Ext.getCmp('recentcommands_button_id').tooltip.update("TEST");
这也不起作用。
有什么想法吗?
最佳答案
您可以使用setTooltip方法:
Ext.getCmp('recentcommands_button_id').setTooltip("TEST");
关于javascript - 如何在运行时更改 Ext Js 按钮工具提示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25672195/