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

Intelisense and autocomplete not working for me

Thread ID:

Created:

Updated:

Platform:

Replies:

132327 Aug 26,2017 11:25 AM UTC Sep 1,2017 04:31 AM UTC WinForms 5
loading
Tags: EditControl
Emmad
Asked On August 27, 2017 03:11 AM UTC

I am using Windows 10, VS2015, Syncfusion Windows Forms 14.24.6

I have 3 questions regarding the EditControl (for syntax highlighting):

Q1-I am trying to create an editor for HTML using the EditControl.
Intelisense does not work. When I click the right mouse button a colored empty rectangle shows but it contains no data. Also, the autocomplete (Ctrl+Spacebar) does not work at all.

My Code:
editControl1.Text = "test";
this.editControl1.ApplyConfiguration (Syncfusion.Windows.Forms.Edit.Enums.KnownLanguages.HTML);
// To set the context choice font.
this.editControl1.ContextChoiceFont = new Font("Monotype Corsiva", 12F, FontStyle.Bold);
// To set the Context Choice back color.
this.editControl1.ContextChoiceBackColor = Color.DodgerBlue;
// To set the Context Choice fore color.
this.editControl1.ContextChoiceForeColor = Color.White;
this.editControl1.Scale(1.5f);

Q2  - What is the correct way to call the "scale" method? The above call gives a warning that the method is deprecated, but I don't know how to use the new version.

Q3 - Do you have a code sample for the functions shown on the following page?
https://www.syncfusion.com/products/windows-forms/editcontrolHello

Thanks,
EK

Kannan R [Syncfusion]
Replied On August 28, 2017 11:01 AM UTC



Hi Emmad 
 
Thank you for contacting Syncfusion support.  
 
Query 
Answers 
Intellisence popup is not displayed.  
Based on your provided code, you have used inbuilt HTML configuration and in that, Intellisence Keywords will not be available. So to display Intellisence popup, it is needed to configure our own language [Just include] necessary keywords combination in it.  
 
For Example 
 
We have created custom language for C# language.  
 
Code Snippet: [XML] 
 
 
  <ConfigLanguage name="CustomLanguage"> 
 
<lexem BeginBlock="." Type="Operator" DropContextChoiceList="true"/> 
 
 
 
Need to handle ContextChoiceOpen and ContextChoiceBeforeOpen events to configure intellisence popup items.  
 
Code Snippet: [C#] 
 
 
        private void editControl1_ContextChoiceOpen(Syncfusion.Windows.Forms.Edit.Interfaces.IContextChoiceController controller) 
        { 
            controller.Items.Add("add", "This is add", this.editControl1.ContextChoiceController.Images["Image0"]); 
            controller.Items.Add("append", "This is append", this.editControl1.ContextChoiceController.Images["Image1"]); 
            controller.Items.Add("array", "This is array", this.editControl1.ContextChoiceController.Images["Image2"]); 
            controller.Items.Add("assert", "This is assert", this.editControl1.ContextChoiceController.Images["Image3"]); 
            controller.Items.Add("avg", "This is avg", this.editControl1.ContextChoiceController.Images["Image4"]); 
            controller.Items.Add("boolean", "This is boolean", this.editControl1.ContextChoiceController.Images["Image6"]); 
            controller.Items.Add("cancel", "This is cancel", this.editControl1.ContextChoiceController.Images["Image7"]);                          
        }  
 
 
            private void editControl1_ContextChoiceBeforeOpen(object sender, System.ComponentModel.CancelEventArgs e) 
            { 
                 ILexemLine lexemLine = this.editControl1.GetLine(this.editControl1.CurrentLine);  
 
            ////Gets the index of the current word in that line 
            int ind = GetContextChoiceCharIndex(lexemLine); 
            if (ind <= 0) 
            { 
                e.Cancel = true; 
                return; 
            } 
            ILexem lex = lexemLine.LineLexems[ind - 1] as ILexem; 
 
            // If the count is less than '2', do not show the ContextChoice popup 
            if (lexemLine.LineLexems.Count < 2) 
                e.Cancel = true; 
            else 
            { 
                                                // Display ContextChoice popup if the lexem used to invoke them is "EditControl" only 
                                                if ((lex.Text == "EditControl") ) 
                                                            e.Cancel = false; 
                                                else 
                                                            e.Cancel = true; 
                 } 
                         
        } 
 
 
 
We have also prepared sample for your reference and it can be downloaded from below location.  
 
 
Screenshot 
 
 
 
Scale function is not working. 
This reported Scale function is not the part of EditControl and it is a framework element property.  
 
Screenshot 
 
 
 
So please let us know the purpose of this requirement. We will analyze and provide you the prompt solution.  
 
 Do you have a code sample for the functions shown on the following page? 
https://www.syncfusion.com/products/windows-forms/editcontrolHello 
 
This provided link is not working. We hope you are referring to Syntax highlighting functionality configuration steps. If so, please refer the sample in below location.  
 
Location: Syncfusion\EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Syntax Highlighting\Syntax Coloring\CS 
 
Otherwise, kindly share us the proper link. So that we can check and provide you the prompt details.  
 
Kindly check with above solution and let us know if it is helpful. 
 
Regards 
Kannan 


Emmad
Replied On August 29, 2017 04:15 AM UTC

1-Thank you for your detailed reply. It was helpful.

2-As per the "scale" method, I wanted to be able to zoom-in and zoom-out (same as what you can do on web page or VS20XX when you press Ctrl+ or Ctrl-).

3-The website I  provided the url for should have read:

https://www.syncfusion.com/products/windows-forms/editcontrol

I was seeking a sample code for the functionality shown since the samples I got with the version 14.24.6.

4-I also wanted to know how to change the font on the editor. Code like myEditor.font=... does not work. I can open a new thread for this if you suggest so.

Thank you very much.

EK.


Mallika Kannan [Syncfusion]
Replied On August 30, 2017 04:39 PM UTC

Hi Emmad 
 
Thanks for Your update. 
 
Please find the details in below, 
 
S.No 
Query 
Answer 
1 
Thank you for your detailed reply. It was helpful. 
Thanks for your Feedback. 
2 
As per the "scale" method, I wanted to be able to zoom-in and zoom-out (same as what you can do on web page or VS20XX when you press Ctrl+ or Ctrl-). 
We have prepared the sample video for your reference. It can be downloaded from the below link. 
 
  
Please find the above link and Can you please confirm as if these as your reported behavior? 
 
 
3 
The website I  provided the url for should have read: 
I was seeking a sample code for the functionality shown since the samples I got with the version 14.24.6. 
 
Please find the sample in below location. 
 
Feature Name 
Sample Location 
Text Interactions 
Syncfusion\EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Interactive Features\Getting Started\CS 
 
Syntax Highlighting 
Syncfusion\EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Syntax Highlighting\Syntax Coloring\CS 
 
Intellisence  
Syncfusion\EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Intellisense Functions 
 
Advance Editor capabilities 
Syncfusion\EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Interactive Features 
 
Printing 
Syncfusion\EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Printing\Print\CS 
 
Export 
Syncfusion\ EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Export\Export\CS 
 
Localization 
Syncfusion\EssentialStudio\[Installed Version]\Windows\Edit.Windows\Samples\Intellisense Functions\Intellisense From XML\CS 
 
 
 
4 
I also wanted to know how to change the font on the editor. Code like myEditor.font=... does not work. I can open a new thread for this if you suggest so. 
This reported Font property is not the part of EditControl and it is a framework element property.   
 
Please refer the Screenshot. 
 
Screenshot 
 
 
 
 
If you want to change the Font size and Font style, please add the values in Config.xml file. 
 
Please make use of the below Code snippet. 
 
<formats> 
      <format name="Text" Font="Courier New, 25pt" FontColor="Black" /> 
</formats> 
 
 
Screenshot 
 
 
 
We have also prepared the sample and video for your reference. It can be downloaded from the below link, 
 
 
 
 
Kindly check the above solution and let us know if it is helpful. 
 
Regards, 
Mallika  
 


Emmad
Replied On August 31, 2017 08:47 PM UTC

Thank you very much for your excellent support. I will study your input. In the meantime, please consider the question closed. Thanks again.


Venkateshwaran Ramdoss [Syncfusion]
Replied On September 1, 2017 04:31 AM UTC

Hi Emmad, 

Thank you for your update. 

We are glad that your problem has been resolved. Please let us know if you need further assistance on this. 

Regards, 
Venkateshwaran V.R. 


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.

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

;