Update pop-up menu according to shapes selected

H

Hin

I need to add/remove menu item in the pop-up menu when user right-click the
shape according to the shapes selected.

I try using the SelectionChange event and the Action Section. It works fine
except the following case:

1, select no shape
2, right-click any one shape

Seems the pop-up menu is shown before the Action section is updated.
Anyone knows how to work around this?
Thanks!
 
C

Chris Roth [ Visio MVP ]

I ran into the same problem and didn't find an answer.

Wild guess that might be worth trying - put some menu-update-code in
VisApp_NoEventsPending or VisApp_IsIdle and see if it works. My guess is
that you'll still get the old version of the menu, but might be worth a
shot.

Also, Visio 2003 has mouse events for window objects, so you could trap
those and draw your own menu. I've done this in with the Visio control, but
not with Visio, so I'm not sure.

With the control, there's some way to turn off the default right-click menu
so you don't end up with two menus, but it slips my mind right now...and I
don't know if it applies to the Visio App.

--

Hope this helps,

Chris Roth
Visio MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top