i want to change a tooltip’s position to show it upon a button. I tried the method below as mentioned in ExtJs’s forum. It doesn’t work, i can’t override the getTargetXY method, the tooltip is shown always in the same position. Do you have any solution ?
this.desktopButton = new Ext.Button({
icon: "arrow_in.png",
scope: this,
handler: this.desktopButtonHandler,
tooltip: new Ext.ToolTip({
text: 'Message',
getTargetXY: function () {
return [100, 100];
}
})
});
Ext elements can only be passed configuration options as specified in the documentation;
getTargetXYis not one of those options.If you want to override that method, you have two choices:
I would not recommend overriding the method, as that could have other consequences. I will, however, explain how to do both.
To override the tooltip:
To extend the tooltip: