Commandbars issues

S

saavdi

Hi all,
I am building a COM addin for Office apps, and have some nagging
roadblocks...

-I am trying to create a dynamic context sensitive menu for ppt. The
menu would appear on rightclick, and the options would change based on
the selected object...

First thing i realised was commandbarpopup does not support events, so i
decided to use the WindowBeforeRightClick event. I redraw the menus on
every right click.. but this does not fully help


In the WindowBeforeRightClick eventhandler i am checking for the
selection type, and based on it, the menus are redrawn.
This works when
-the shape is selected and the user right-clicks on it
-but not when the user does both together (user selects the shape by
right clicking on it)

the 2nd scenario does not work cos, i am not able identify what shape is
being right clicked, as the selection only happens after the event code
finishes (i hope this is not totally confusing)

How do we workaround this.. does anybody have any ideas.. i am aware of
the selectionchange event, but that would run a million times and slow
it down..


ANY help appreciated
rg
 

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