How can I use only PART of the Edit Control's Context Menu?

To keep from having to write my own custom context menu -
 
Is there a way to only use certain items in the built-in context menu?
 
For instance, if I don't want "Advanced", "Bookmarks" and "options" to appear, and only show 'Edit' and 'File' - how would I do that?

1 Reply

SG Selva Ganapathy Kathiresan Syncfusion Team August 16, 2012 09:34 AM UTC

Hi David,

Thanks for your interest in Syncfusion products.

You can achieve the requirement by using the following code snippets

Dim cm As ContextMenuManager = CType(sender, ContextMenuManager)

' To clear default context menu items
cm.ClearMenu()
' Add a separator
cm.AddSeparator()

' Add custom custom context menu items and their Click eventhandlers
cm.AddMenuItem("&Find", New EventHandler(AddressOf ShowFindDialog))
cm.AddMenuItem("&Replace", New EventHandler(AddressOf ShowReplaceDialog))
cm.AddMenuItem("&Goto", New EventHandler(AddressOf ShowGoToDialog))

I have attached the sample as per your requirements in the following link. Please run the sample and let us know if it helps you.

http://www.syncfusion.com/downloads/Support/DirectTrac/97582/VB1265282884.zip

Please let me know if you have any concerns.

Regards,

Selva Ganapathy K

Loader.
Up arrow icon