Profile Picture

Dynamic tooltips on shapes

Posted By Andrew Shand 10 Years Ago
Author
Message
Andrew Shand
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 7, Visits: 4
I'm having no joy getting InteractivityManager.RequestTooltip to work? Can anyone shed any light - the documentation is less than helpful...

Andy

Andrew Shand
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 7, Visits: 4
Thanks. I've tried subscribing to the NodeMouseMove event on the EventSinkService, but it doesn't seem to fire. The NodeSelected and NodeDeselected events do fire however.

So, I tried subscribing to MouseMove on each shape that I've created. This does fire. However, calling InteractivityManager.RequestTooltip() doesn't seem to have any effect? Is there something else I need to do to then display the tooltip?

Regards
Andy

Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi,

You can subscribe for the MouseMove event of the event sink service and request an arbitrary tooltip for the shape - like this.

...
document.EventSinkService.NodeMouseMove += new NodeMouseEventHandler(EventSinkService_NodeMouseMove);
...
void EventSinkService_NodeMouseMove(NNodeMouseEventArgs args)
{
// TODO: Get custom tooltip for the hit node.
INNode diagramNode = args.HitNode;
view.InteractivityManager.RequestTooltip("Custom Tooltip");
}

Best Regards,
Nevron Support Team



Andrew Shand
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 7, Visits: 4
Hi,

I see how to add a tooltip to a shape. Is there any way to create a dynamic tooltip - either getting a callback when the tooltip is about to be displayed, or overriding the getter for the tooltip - so that the text can be changed before being displayed?

Thanks
Andy





Similar Topics


Reading This Topic