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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Remove Default Context menu

Thread ID:

Created:

Updated:

Platform:

Replies:

68135 Sep 10,2007 12:02 PM UTC Sep 17,2007 05:11 AM UTC WinForms 4
loading
Tags: EditControl
Sekar
Asked On September 10, 2007 12:02 PM UTC

Hi there,
I am using syncfusion 4.402.0.51 and .NET 2.0

I have used edit control in my application to show the content from a file. It shows the file correctly, but i want to remove the default context menus available in the edit control also remove the shortcuts for them, and i need to add my custom menus with my shorcut to the context menu of the edit control.

How do i do that? if possible give me a working example.

Jisha Joy [Syncfusion]
Replied On September 12, 2007 11:48 AM UTC

Hi Sekar,

By Setting the EditControl.ContextMenuEnabled property to false value does disable the default context menu and the hot keys that get activated are associated with the editcontrol itself. And so if you want to disable the hot keys such as Ctrl +F and etc., you need to remove the corresponding key binding using the EditControl.KeyBinder.RemoveBinding(..) method. Set custom ContextMenu as EditControl ContextMenu. Below is the sample code snippet for your reference:


// Disable the default context menu
this.editControl1.ContextMenuEnabled = false;

//this will remove CtrlF shortcut
this.editControl1.KeyBinder.RemoveBinding(Keys.Control | Keys.F);

// Set custom ContextMenu as EditControl ContextMenu
this.editControl1.ContextMenu = this.contextMenu1;


Please refer to the attached sample that illustrates the same:
http://websamples.syncfusion.com/samples/Edit/F68135/main.htm

Please try with the above details and let me know if you have any questions.

Regards,
Jisha

Sekar
Replied On September 12, 2007 01:51 PM UTC

Jisha,

Thanks for your update.
Is there any way that I can remove all the Keybindings from edit control? like this

this.editControl1.KeyBinder.RemoveAllBindings()
So that i need not call for each key associated with that.

Thanks,
Sekar

Jisha Joy [Syncfusion]
Replied On September 13, 2007 06:12 AM UTC

Hi Sekar,

Thank you for your interest in Syncfusion Essential Studio.

The question you’ve posted has raised some very significant issues, as this might be a Feature Request. We will get back to you within 2 business days with a complete response after due analysis of these issues.

Thank you for your patience.

Regards,
Jisha

Jisha Joy [Syncfusion]
Replied On September 17, 2007 05:11 AM UTC

Hi Sekar,

Currently we do not provide support to remove all keybindings from EditControl. This has been confirmed as a Feature Request. We will implement this feature in our forthcoming new version releases or service pack releases. We usually have a timeframe of at least three months between releases. The feature implementation would also greatly depend on the factors like product design, code compatibility and complexity. We will get back to you once the feature is implemented.

Thank you for your interest in Syncfusion products.

Regards,
Jisha

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;