Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Dynamic tooltip (Read 3158 times)
dku
YaBB Newbies
*
Offline



Posts: 41
Joined: Jun 5th, 2008
Dynamic tooltip
Aug 27th, 2008 at 7:28am
Print Post  
Hello,

I'm associating object with diagram items through tag property. My associated objects have all the same interface with a GetDescription method returning a string.

I want to display this description in the tooltip but I don't want to set all tooltips to diagram items.

Is that possible to be be called to provide the tooltip content dynamically ?

I've seen the GetToolTipmethod, but if possible, I don't want to override the items.

Thanks
Didier
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dynamic tooltip
Reply #1 - Aug 27th, 2008 at 9:50am
Print Post  
Hi,

The WPF TooltipService displays the tooltip of a parent element when a child element doesn't provide its own tooltip. You might handle MouseMove and call

ToolTipService.SetToolTip(diagram, tagDescription);

where tagDescription is a value you get form the tag of the item under the mouse cursor, or null if there is no item under the cursor.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
dku
YaBB Newbies
*
Offline



Posts: 41
Joined: Jun 5th, 2008
Re: Dynamic tooltip
Reply #2 - Aug 27th, 2008 at 12:43pm
Print Post  
Yes, thanks.
Didier
  
Back to top
 
IP Logged
 
SC
YaBB Newbies
*
Offline



Posts: 37
Joined: Jan 18th, 2008
Re: Dynamic tooltip
Reply #3 - Sep 8th, 2008 at 10:42pm
Print Post  
I have diagramnode and shapenodes are attached to its inputs and outputs.
How can I show tooltip when I hover over the output shapenode. I couldn't find any events/methods for shapenodes.

Thanks
CS
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Dynamic tooltip
Reply #4 - Sep 9th, 2008 at 6:53am
Print Post  
You could either set the ShapeNode's ToolTip, or call ToolTipService.SetToolTip(diagram, tagDescription) from the MouseMove handler depending on what node is returned by the GetNodeAt method.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint