| 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. |
| 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. |
| 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) |