Tooltip (Shape Comment) disappears if subscribed to idle event

Started by Nikolay, March 05, 2020, 01:49:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nikolay

If you have some shapes with comment, and you have some macro that subscribes to "NoEventsPending" event or "VisioIsIdle" event,
the tooltip does not show up anymore.

Notes:
- Visio 2013 and above are affected (up to the latest Visio 365). Works properly in Visio 2010 and below.
- VBA IDE must be closed. If you open VBA IDE, the tooltips start showing up.

Steps to reproduce:

- Open the diagram attached. It has two macros, one adds "NoEvent" handler, called "BreakIt", another removes the "NoEvent" handler, called "FixIt"
- Verify that (the only) shape has tooltip right after the diagram is opened (it shows up when you hover the shape, "Hello world").
- Execute macro "BreakIt" (Click Alt+F8, select "BreakIt" from the list). This will add event handler for the "NoEventPending" event.
- Save the diagram (maybe optional, probalby only needed for "No Events" event, for VisioIdle this step can be omitted).

- Hover the shape. The tooltip does not show up now anymore <<<<<<<<<< the bug

- Execute macro "FixIt" (Click Alt+F8, select "FixIt" from the list). This will unsubscribe from the event.
- Hover the shape. Now the tooltip is back.

Example diagram is attached.

Would be happy if somebody could confirm the issue.
Workarounds are also highly appreciated!

Paul Herber

A VSTO addin that subscribes to the NoEventsPending event doesn't show this problem.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Nikolay

Thank you, Paul - this sounds like a perfect workaround for me :)

Visio Guy

Hi Nikolay,

I ran BreakIt and FixIt and always saw the tooltip on the shape, even after Save.

Running Visio 2016 O365 Plan 2, whatever, whatever.

I even added some code (Debug.Print) in the NoEventsPending to try and slow it down, but it worked anyway.



For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Nikolay

Dear Chris, thank you for checking!

Did you have VBA IDE closed when checking? (this point is important)

Visio Guy

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Nikolay