T
Thomas Klaus
I know this item has been discussed several times, but couldn't find an
appropriate solution.
I've created a Visio Add-in in C#. Now i want to create a dynamic
context menu for a shape. That means, there exist several different
types of shapes and for each type, a different context menu is shown.
Actually, i'm using the Actions section in the shapesheet of a shape to
create a dynamic context menu. The problem is, i've got diagrams with
several hundred of shapes. So if i want to change a context menu for a
specific type of shape, i need to recreate the Actions section in the
shapesheet of every changed shape. Since this operation is too
expensive, there must be another solution.
Then i tried using the UIObject (Visio) and also the CommandBar
(Office) approach. But with this, when a user directly right click on a
shape without selecting the shape first, i'm not able to update the
context menu before the menu is shown. I'm catching the
SelectionChanged event, but at this time, the context menu is already
displayed.
I know with Visio 2003, there is the possibility to catch Mouse events,
but i also need to support Visio 2002.
Is there an appropriate solution or workaround for this problem?
Any help would be greatly appreciated.
Thanks,
Thomas Klaus
appropriate solution.
I've created a Visio Add-in in C#. Now i want to create a dynamic
context menu for a shape. That means, there exist several different
types of shapes and for each type, a different context menu is shown.
Actually, i'm using the Actions section in the shapesheet of a shape to
create a dynamic context menu. The problem is, i've got diagrams with
several hundred of shapes. So if i want to change a context menu for a
specific type of shape, i need to recreate the Actions section in the
shapesheet of every changed shape. Since this operation is too
expensive, there must be another solution.
Then i tried using the UIObject (Visio) and also the CommandBar
(Office) approach. But with this, when a user directly right click on a
shape without selecting the shape first, i'm not able to update the
context menu before the menu is shown. I'm catching the
SelectionChanged event, but at this time, the context menu is already
displayed.
I know with Visio 2003, there is the possibility to catch Mouse events,
but i also need to support Visio 2002.
Is there an appropriate solution or workaround for this problem?
Any help would be greatly appreciated.
Thanks,
Thomas Klaus