How to override the default ContextMenu?

SyntaxEditor for Windows Forms Forum

Posted 15 years ago by shark92651
Avatar
I am trying to get SyntaxEditor to work withe Developer's Express menus. When I right-click the editor, I get a "default" context menu and not the DevEx menu I assigned. I then tried just using a standard Windows.Forms ContextMenu and assigned it to the ContextMenu property - this one does not display either. How can I override the default behavior and get this to work?

Thanks

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
If you assign a ContextMenu to the ContextMenu property it shows properly. I just tried it myself with this code:
ContextMenu m = new ContextMenu();
m.MenuItems.Add(new MenuItem("TEST"));
editor.ContextMenu = m;
If you want to use a third-party menu, set the DefaultContextMenuEnabled to false and display the third-party menu in the ContextMenuRequested event.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.