)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to create intellisense function in WinForms SyntaxEditor (EditControl)?

Platform: WinForms |
Control: EditControl |
Published Date: November 21, 2014 |
Last Revised Date: December 11, 2019

Intellisense function

The Intellisence function can be implemented in EditControl by handling the ContextChoiceOpen Events. Through this event, you can add the list of items, like methods and properties, to the Context Menu. The list can be added to the Context Menu using the following code snippets.

C#

private void editControl1_ContextChoiceOpen(IContextChoiceController controller)
{
    //Gets the list of Method and Property configurations for current context.
    ICollection list = GetList();
    int imageIndex = 0;
    //Adds configuration BeginBlocks and associated descriptions to the Context Choice List.
    foreach (IConfigLexem conf in list)
    {
        controller.Items.Add(conf.BeginBlock, (string)m_MethodComments[conf.ID], this.editControl1.ContextChoiceController.Images["Image" + imageIndex.ToString()]);
        imageIndex++;
    }
}

VB

Private Sub editControl1_ContextChoiceOpen(ByVal controller As IContextChoiceController) Handles editControl1.ContextChoiceOpen
   'Gets the list of Method and Property configurations for current context.
    Dim list As ICollection = GetList()
    Dim imageIndex As Integer = 0
    'Adds configuration BeginBlocks and associated descriptions to the Context Choice List.
    For Each conf As IConfigLexem In list
        controller.Items.Add(conf.BeginBlock, CStr(m_MethodComments(conf.ID)), Me.editControl1.ContextChoiceController.Images("Image" & imageIndex.ToString()))
        imageIndex += 1
    Next conf
End Sub

Sample:

http://www.syncfusion.com/downloads/support/directtrac/general/Intellisence_function-298910315.zip

Reference link: https://help.syncfusion.com/windowsforms/syntax-editor/intellisense#populate-intellisense-pop-up

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon