Reputation: 1
I am tring to implement TooltipDialog with Dojo, Although the dialog shows up great,But I still have no idea how to change the content of the tip, I have code as following:
var _tipContent;
require([
"dijit/TooltipDialog",
"dijit/popup",
"dojo/on",
"dojo/dom",
"dojo/domReady!"
], function (TooltipDialog, popup, on, dom) {
var myTooltipDialog = new TooltipDialog({
id: 'myTooltipDialog',
style: "width: 300px;",
content: _tipContent,
onMouseLeave: function () {
popup.close(myTooltipDialog);
}
});
on(dom.byId('TriggerBlock'), 'mouseover', function () {
popup.open({
popup: myTooltipDialog,
around: dom.byId('TriggerBlock')
});
});
});
function onMouseOverGraphics(sender, eventArgs) {
_tipContent = "I wanna change the tip's content according to the current position, the x coordinate: " + eventArgs.clientX;
}
Upvotes: 0
Views: 269
Reputation: 980
Try using this instead:
dijit.showTooltip("This is the tool tip content",
//this is the dom where you want the tooltip to show
select.domNode,
//this is an attribute to get where the tooltip of the dom
select.get('tooltipPosition'),
//this is the position or the side of where the tooltip will sho
!select.isLeftToRight()
);
Upvotes: 1