We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

104713 Aug 11,2012 12:57 PM Aug 16,2012 05:34 AM Windows Forms 1
loading
Tags: EditControl
David Wier
Asked On August 11, 2012 12:57 PM

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?

Selva Ganapathy K [Syncfusion]
Replied On August 16, 2012 05:34 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;