Author Topic: Tooltip (Shape Comment) disappears if subscribed to idle event  (Read 409 times)

0 Members and 1 Guest are viewing this topic.

Nikolay

  • Hero Member
  • *****
  • Posts: 931
    • UnmanagedVisio
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2891
    • Paul Herber's website
Re: Tooltip (Shape Comment) disappears if subscribed to idle event
« Reply #1 on: March 05, 2020, 09:00:41 AM »
A VSTO addin that subscribes to the NoEventsPending event doesn't show this problem.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

Nikolay

  • Hero Member
  • *****
  • Posts: 931
    • UnmanagedVisio
Re: Tooltip (Shape Comment) disappears if subscribed to idle event
« Reply #2 on: March 05, 2020, 09:32:01 AM »
Thank you, Paul - this sounds like a perfect workaround for me :)

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1712
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Tooltip (Shape Comment) disappears if subscribed to idle event
« Reply #3 on: March 09, 2020, 04: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.



« Last Edit: March 09, 2020, 04:54:55 PM by 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

  • Hero Member
  • *****
  • Posts: 931
    • UnmanagedVisio
Re: Tooltip (Shape Comment) disappears if subscribed to idle event
« Reply #4 on: March 09, 2020, 05:21:02 PM »
Dear Chris, thank you for checking!

Did you have VBA IDE closed when checking? (this point is important)
« Last Edit: March 09, 2020, 05:23:26 PM by Nikolay »

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1712
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Tooltip (Shape Comment) disappears if subscribed to idle event
« Reply #5 on: March 09, 2020, 05:58:22 PM »
AH!

Shutting VBA after BreakIt = NO TOOLTIP!
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

  • Hero Member
  • *****
  • Posts: 931
    • UnmanagedVisio
Re: Tooltip (Shape Comment) disappears if subscribed to idle event
« Reply #6 on: March 12, 2020, 08:09:07 AM »
Do you think it worth reporting to Microsoft?