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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is it possible to do make intellisense in editcontrol really understand the language

Thread ID:





146563 Aug 8,2019 09:48 AM UTC Aug 9,2019 02:12 PM UTC WinForms 1
Tags: EditControl
Asked On August 8, 2019 09:48 AM UTC

let say i am making a c# text editor, i would like to provide this kind of intellisense

i am typing the following in editcontrol after the line
public class abcd
     public void MethodA() { }
     public void MethodB() { }

public class xyz
     public void MethodM() {
          abcd var1 = new abcd();
          var1. <----- after i type the dot, i want intellisense popup and show MethodA and MethodB for me to select. Is it possible

Another example i want to do is SQL
i have a table (named: tbl1) and it has 2 columns (colA, colB).

after i type this line
select * from tbl1 a

i go back to replace the * to field name
select a. from tbl1 a <--- after i type a., i want intellisense show colA and colB for me to select. Is it possible

Kanniyappan Panneer Selvam [Syncfusion]
Replied On August 9, 2019 02:12 PM UTC

Hi Alex, 
Thanks for contacting syncfusion support. 
We have checked your query “Need Intellisense popup for C# and SQL text editor” at our end. We have configured the custom intellisense for properties and methods from the provided C# code. We have prepared the sample based on the provided information. You can follow the same procedure to SQL language also. Please find the code snippet, screenshot and sample for the same. 
Code Snippet: 
// Creates new file using C# language configuration. 
            // Creates format for methods coloring. 
            ISnippetFormat formatMethod = editControl1.Language.Add("Method", "Text"); 
            formatMethod.FontColor = Color.HotPink; 
            // Creates format for properties coloring. 
            ISnippetFormat formatProperty = editControl1.Language.Add("Property", "Text"); 
            formatProperty.FontColor = Color.Goldenrod; 
            // Disables ContextChoiceList dropping after dot in global context. 
            ConfigLexem lexemDot_ = GetConfigLexem((IConfigLexem)editControl1.Language, "."); 
            lexemDot_.DropContextChoiceList = false; 
            // Add configuration for "Property1" 
            ConfigLexem this_Property1 = GetConfigLexem((IConfigLexem)editControl1.Language, "var1"); 
            this_Property1.Type = FormatType.Custom; this_Property1.FormatName = "Property"; 
            this_Property1.IsComplex = true; 
            // Add configuration for "." after "Property1" 
            ConfigLexem propertyDot = GetConfigLexem((IConfigLexem)this_Property1, "."); 
            propertyDot.Type = FormatType.Operator; 
            propertyDot.DropContextChoiceList = true; 
            propertyDot.IsComplex = true; 
            propertyDot.Priority = 10; 
            // Add "Method1" configuration after "this.Property1." 
            ConfigLexem property_Method1 = GetConfigLexem((IConfigLexem)propertyDot, "MethodA"); 
            property_Method1.Type = FormatType.Custom; property_Method1.FormatName = "Method"; 
            property_Method1.IsComplex = true; 
            // Add "Method2" configuration after "this.Property1." 
            ConfigLexem property_Method2 = GetConfigLexem((IConfigLexem)propertyDot, "MethodB"); 
            property_Method2.Type = FormatType.Custom; property_Method2.FormatName = "Method"; 
            property_Method2.IsComplex = true; 
            m_MethodComments[this_Property1.ID] = "The only one property\nIt has multiline description"; 
            m_MethodComments[property_Method1.ID] = "Method 1"; 
            m_MethodComments[property_Method2.ID] = "Method 2"; 
Please try the above solution  and let us know if it is helpful. 
Kanniyappan P 


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon