Custom ToolTip

Dec 14, 2008 at 1:14 PM


First THANK YOU this is great tool!
I need to customize NetMap control is there simple way to setup custom tooltip instead default one?

Kind regards
Mateusz Kierepka

Dec 14, 2008 at 7:15 PM

Thanks for giving NodeXL a try.

Someone on my team at Microsoft asked the same question recently.  Here was my reply:

"Set NodeXLControl.ShowToolTips to true, but don't set tooltip keys on any of the graph's vertices.  That causes NodeXLControl to fire VertexMouseHover events.  (See the VertexMouseHover topic in the NodeXLApi.chm help file for details.)  In your event handler, make visible a normally-hidden UserControl that contains your custom tooltip content.  To position the UserControl, read the Location property of the vertex provided in the event arguments.  You'll probably want to hide the UserControl after some elapsed time.  You'll have to use a Windows.Forms.Timer for this, because there is no "VertexMouseUnhover" event."

So I don't know whether you would consider this "simple," but it is doable.  To eliminate the need for a timer, I plan to add a VertexMouseUnhover event to NodeXLControl in an upcoming release.

-- Tony
Dec 15, 2008 at 8:10 PM

Maybe better solution will be in next version to allow user to set up custom Tooltip? For example I need online editing in my nodes with custom controls (edit, delete, cancel etc.).
It is possible to add another member CreateToolTipPanel for NetMapControl class, but with ToolTipPanel as parameter and add iToolTipPanel as interface for all new ToolTipPanels? ;)

Dec 16, 2008 at 5:56 AM

That probably won't happen, for two reasons:

1. The kind of external-content support you describe isn't typical of controls in the Windows Forms world -- none of the standard .NET controls do that, for example.  That would typically be handled at the application level in response to events fired by the control, which can be handled in any number of application-specific ways.

2. Apart from bug fixes, we're not doing much further development on NodeXLControl (formerly NetMapControl), because we're developing a new WPF-based version of the control to replace the old one.  The scheme you describe would actually be much more at home in the WPF world, where element content can typically be anything, so I'll see how difficult it would be to support external tooltip content in the new version.

-- Tony
Dec 16, 2008 at 5:58 AM
Edited Dec 16, 2008 at 6:17 AM
(The CodePlex spell checker keeps wanting to replace "WPF" with the word "BEEF."  If it had its way, I would be developing a new beef-based version of the control.)