Visio Guy

Visio Discussions => Visio Bugs (er...Issues) => Topic started by: Nikolay on March 05, 2020, 01:49:15 PM

Title: Tooltip (Shape Comment) disappears if subscribed to idle event
Post by: Nikolay on March 05, 2020, 01:49:15 PM
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!
Title: Re: Tooltip (Shape Comment) disappears if subscribed to idle event
Post by: Paul Herber on March 05, 2020, 02:00:41 PM
A VSTO addin that subscribes to the NoEventsPending event doesn't show this problem.
Title: Re: Tooltip (Shape Comment) disappears if subscribed to idle event
Post by: Nikolay on March 05, 2020, 02:32:01 PM
Thank you, Paul - this sounds like a perfect workaround for me :)
Title: Re: Tooltip (Shape Comment) disappears if subscribed to idle event
Post by: Visio Guy on March 09, 2020, 09:52:40 PM
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.



Title: Re: Tooltip (Shape Comment) disappears if subscribed to idle event
Post by: Nikolay on March 09, 2020, 10:21:02 PM
Dear Chris, thank you for checking!

Did you have VBA IDE closed when checking? (this point is important)
Title: Re: Tooltip (Shape Comment) disappears if subscribed to idle event
Post by: Visio Guy on March 09, 2020, 10:58:22 PM
AH!

Shutting VBA after BreakIt = NO TOOLTIP!
Title: Re: Tooltip (Shape Comment) disappears if subscribed to idle event
Post by: Nikolay on March 12, 2020, 01:09:07 PM
Do you think it worth reporting to Microsoft?