Category / Section
How to get the tokens in each line of the WinForms SyntaxEditor (EditControl)?
1 min read
Collection of lexem
You could accomplish this by getting hold of the ILexemLine object associated with any particular line and then accessing its Lexems in the LineLexems collection as shown in code below.
C#
ILexemLine lexemLine = this.editControl1.GetLine(this.editControl1.CurrentLine); foreach (Lexem lexem in lexemLine.LineLexems) { lexemArrayList.Add(lexem); }
VB
Dim lexemLine As ILexemLine = Me.editControl1.GetLine(Me.editControl1.CurrentLine) Dim lexem As Lexem For Each lexem In lexemLine.LineLexems lexemArrayList.Add(lexem) Next
Reference link: https://help.syncfusion.com/windowsforms/syntaxeditor/intellisense