Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Overriding the menu close behavior when a menu item is clicked.

$
0
0

I'm developing an extension with a menu that has a ComboBox. The user can pick a modifier from the selection which is then to be used in menu commands further down.

My issue is that currently whenever I pick from the ComboBox the menu closes as is usual behavior when you click non-submenu options. I'd rather this didn't happen as it breaks the flow.
So I'm trying to figure out a way to disable this behavior specifically when dealing with this command, which has a ComboBox.

Things I can think of but have had no luck finding:

- An id or reference in the menu command that comes with the callback that I could use to grab the menu and do stuff with it. 

- A class that implements IVsMenuItem or some type of IVsMenu class that allows me to manipulate a menu.

Having either of those I could then disable the behaviour to just work around it by having the menu open again. 

This is Windows 10,  Visual Studio 2017, .NetFramework 4.7.2. This should be replicatable by simply adding a command (specifically a ComboBox if it makes a difference) to a menu and clicking it.

TL;DR I need to have a menu either not close or open a menu when a Menu command is clicked/called.


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>