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

inserting code snippets programmatically

Thread ID:





69565 Nov 1,2007 10:47 PM UTC Nov 7,2007 08:11 AM UTC WinForms 3
Tags: EditControl
Asked On November 1, 2007 10:47 PM UTC


Is there a sample or documentation on how to insert code snippets programmatically? I'd like to add it to the edit control's context menu.



Golda Rebecal [Syncfusion]
Replied On November 3, 2007 05:20 AM UTC

Hi Travis,

Code snippets feature is implemented by using many internal methods and they are not exposed. Hence it is not possible to use this feature programmatically.

Kindly let me know if you have any questions.

We appreciate your interest in Syncfusion products.

Best regards,

Replied On November 7, 2007 02:01 AM UTC

Let me clarify. I'd like to have a context menu entry called something like "Insert code snippet..." that when chosen would simply pop up the code snippet picker in the editor on the current line (as if Ctrl+`) was pressed. Is something like this possible?

If no method exists to do this, could I simulate a Ctrl+` key press when the context menu item is selected?


Golda Rebecal [Syncfusion]
Replied On November 7, 2007 08:11 AM UTC

Hi Travis,

You can pop up the code snippet picker in the EditControl by using ShowCodeSnippets() method of EditControl

Please refer to the attached sample that illustrates the same:

Kindly let me know if this helps you.

Best regards,


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