Is there any tutorial on EditControl?
Is there any tutorial on EditControl ? The online help documentation doesn't show much information. The sample codes explorer for winforms that I downloaded has crashed as of now I can't recover it.
I would like to accomplish the following with EditControl
1) parse text data to EditControl. Data sources are different text boxes and values from property editor
2) highlight keywords (on data load or while typing on real-time)
3) define what & where to collapse /expand
4) convert text equations (un-formated equations) into image equations
I would highly appreciate for any ideas that would help me to accomplish the above tasks
SIGN IN To post a reply.
7 Replies
MK
Mallika Kannan
Syncfusion Team
February 6, 2018 12:47 PM UTC
Hi Allen Zeru
Thank you for contacting Syncfusion support.
Please find the details in below,
| Query | Response | |
| parse text data to EditControl. Data sources are different text boxes and values from property editor | Yes, you can parse the text from different text boxes to EditControl. It can be achieved using the below Code Example. Code Example: [C#]
We have also prepared the sample for your reference. It can be downloaded from the below link, Sample: https://www.syncfusion.com/downloads/support/forum/135775/ze/EditControlExample425820906.zip | |
| highlight keywords (on data load or while typing on real-time) | Editcontrol supports Syntax Highlighting and Code Coloring of some of the commonly used languages with the help of configuration files. It provides pre-defined configuration files for languages like SQL, Delphi or Pascal, HTML, VB.NET, XML, Java, VBScript, JScript and C#. We have also prepared the sample which tries to meet your requirement. In this sample, we are apply configuration using Configurator.Open() and ApplyConfiguration() methods. Please make use of the below codes. Code Example: [C#]
We have attached a sample for the same. Sample: https://www.syncfusion.com/downloads/support/forum/135775/ze/EditControlExample425820906.zip | |
| define what & where to collapse /expand | Essential Edit provides Visual Studio like support for collapsing and expanding (plus-minus buttons) blocks of code. It can achieved using the below Code example. Code Example: [XML]
| |
| convert text equations (un-formated equations) into image equations | We have checked your query “Unformatted Text equations into Image equation“ at our end. At present there is no default support to achieve your requirement. This feature will implemented in any of our upcoming release. |
Please get back to us with more details, if the above solution doesn’t meet your requirement.
Regards,
Mallika
AL
Allen
February 6, 2018 04:41 PM UTC
Dear Mallika,
Thank you so much. I would highly appreciate if you can have a vs2008 compatible. I am unable to open the sample as I work on vb2008 .net 3.5
Once again, thank you
MK
Mallika Kannan
Syncfusion Team
February 7, 2018 11:38 AM UTC
Hi Allen Zeru
Thanks for your update.
As per your request, we have prepared the sample for VB2008 .net 3.5 version. It can be downloaded from the below link,
Please get back to us with more details, if the above solution doesn’t meet your requirement.
Regards,
Mallika
AL
Allen
February 7, 2018 07:33 PM UTC
Dear Mallika,
Thank you so much. After evaluating this, I just have feature related questions:
1) what would happen if there is no configuration file? I mean, is it still possible to write a code that produces effects similar to the configuration file?
2) if a configuration file is a must to have, does it mean that it has to be exported with the application (which would be visible to the end users)?
2) is there a starter example that shows how to creat a bare minimum custom keywords,, say, highlighting three keywords, one in blue, the other in red, and the third in yellow?
MK
Mallika Kannan
Syncfusion Team
February 8, 2018 12:05 PM UTC
Hi Allen Zeru
Thanks for your update.
Please find the details in below,
| Query | Response | |
| 1) what would happen if there is no configuration file? I mean, is it still possible to write a code that produces effects similar to the configuration file? | EditControl has pre-defined configuration files for below languages.
These configuration settings are made available in the KnownLanguages collection. So, it will produce the configuration file effect without any external configuration file. We have also provided the sample which tries to meet your requirement. In this sample, we don’t have any Configuration file. Sample: EditControlExample Please refer this below documentation, it will guide in requested use case. UG Link: https://help.syncfusion.com/windowsforms/syntaxeditor/syntax-highlighting-and-code-coloring | |
| if a configuration file is a must to have, does it mean that it has to be exported with the application (which would be visible to the end users)? | External configuration file which is used in your application will not be visible to the end user. It is used to customize the languages in configuration setting. Please refer this below documentation will guide in requested use case. | |
| is there a starter example that shows how to creat a bare minimum custom keywords,, say, highlighting three keywords, one in blue, the other in red, and the third in yellow? | Yes, we have prepared the sample for your query “how to create a bar minimum custom keywords,, say, highlighting three keywords, one in blue, the other in red, and the third in yellow? ”. In this sample we have set the Keyword named as Keyword1, Keyword2 and Keyword3 then we apply the required Font Color for this. The Following code demonstrates the Same. Code Example: [XML]
Screenshot Sample: EditControlSample Please check this above solution. If we have misunderstood your query please get back to us with more details like video/ Screenshot that demonstrates your requirement. This would help us to provide the solution at earliest. |
Regards
Mallika
AL
Allen
February 16, 2018 08:09 PM UTC
Thank you so much Mallika. my 2nd question was to accomplish like the example given at the following link. But I have issues with the NewConfigLanguage declaration. What instructions should I follow to declare it?
Creating Configuration Settings Programmatically
https://help.syncfusion.com/windowsforms/syntaxeditor/configuration-settings
Dim currentConfigLanguage As IConfigLanguage = Me.editControl1.Configurator.CreateLanguageConfiguration(NewConfigLanguage)
Dim currentConfigLanguage As IConfigLanguage = Me.editControl1.Configurator.CreateLanguageConfiguration(NewConfigLanguage)
MK
Mallika Kannan
Syncfusion Team
February 20, 2018 05:22 PM UTC
Hi Allen T
Thanks for your patience.
Query: My 2nd question was to accomplish like the example given at the following link. But I have issues with the NewConfigLanguage declaration. What instructions should I follow to declare it?
To create Configuration setting programmatically, you need to parse the “New Configuration Language Name” on CreateLanguageConfiguration function. The following code demonstrates the same.
Code Example: [VB]
| Create New Configuration Language Dim language As IConfigLanguage = Me.editControl1.Configurator.CreateLanguageConfiguration("New") 'adding the required splitter Dim s1 As New Split("/*") Dim s2 As New Split("*/") language.Splits.Add(s1) language.Splits.Add(s2) 'Apply the new Configuration language Me.editControl1.ApplyConfiguration(language) 'Create Custom Format object named Keyword Dim keyword As ISnippetFormat = Me.editControl1.Language.Add("Keyword") 'set its attributes keyword.Font = New Font("Arial", 10, FontStyle.Regular) keyword.FontColor = Color.Blue 'Creating a ConfigLexem object that belongs to the above defined format. Dim keywordlexem1 As New ConfigLexem("private", "", FormatType.Custom, False) 'Defining its attributes. keywordlexem1.FormatName = "Keyword" 'Add the ConfigLexem object to the Lexems collection of the current language. Me.editControl1.Language.Lexems.Add(keywordlexem1) Dim keywordlexem2 As New ConfigLexem("int", "", FormatType.Custom, False) keywordlexem2.FormatName = "Keyword" Me.editControl1.Language.Lexems.Add(keywordlexem2) Dim configLex As New ConfigLexem("this", "", FormatType.Custom, False) configLex.FormatName = "Keyword" Me.editControl1.Language.Lexems.Add(configLex) |
Please refer the below documentation for further reference.
We have prepared the sample for the same. Please download it from below location,
Please try the above solution and let us know if it is helpful.
Regards,
Mallika
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
AL Allen
- Feb 5, 2018 12:35 PM UTC
- Feb 20, 2018 05:22 PM UTC