How to override the default ContextMenu?

SyntaxEditor for Windows Forms Forum

Posted 17 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 17 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 (v21.1.0) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.