パネルに配置されたツールからツールチップテキストを変更する方法はありますか?ToolTipオブジェクトとQuickTipを見ましたが、どちらにもsetTipText()のような関数はありません。
ありがとう、Y_Y
パネルに配置されたツールからツールチップテキストを変更する方法はありますか?ToolTipオブジェクトとQuickTipを見ましたが、どちらにもsetTipText()のような関数はありません。
ありがとう、Y_Y
ツールチップにitemIdを配置できなかったため、次のようにツールのツールチップを動的に更新できました。
var toolTip = Ext.get(tool.getEl().id + '-toolEl');
toolTip.set({
'data-qtitle': 'New Tooltip Title', //this line is optional
'data-qtip': 'Updated Tool Tip!'
});
私はあなたの問題に対して2つの解決策を持っています!
HTML属性を変更する
toolTip=Ext.ComponentQuery.query('tooltip[itemId=myToolTip]')[0];
toolTip.html = "This is the new text!";
toolTip.setTitle("new Title");
toolTip.render();
古いものを破壊し、新しいものを作ります...
tooltip.destroy();
var config = {
target: 'bottomCallout',
anchor: 'top',
anchorOffset: 85, // center the anchor on the tooltip
html: "Fancy new ToolTip with a totally different config..."
};
Ext.create('Ext.tip.ToolTip', config);