Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

I'm trying to highlight text surrounded by brackets or any symbol, but I can't make it work. This is the code, the first lexem works, the other two won't work. I don't know what I'm doing wrong.


var format = editControl1.Language.Add("Property");
format.FontColor = Color.Red;
format.Font = new Font(FontFamily.GenericMonospace, 12, FontStyle.Bold);

var lex1 = new ConfigLexem("as23", "", FormatType.Custom, false);
lex1.FormatName = "Property";
editControl1.Language.Lexems.Add(lex1);

var lex2 = new ConfigLexem("{keyss}", "",FormatType.Custom, false);
lex2.FormatName = "Property";
editControl1.Language.Lexems.Add(lex2);

var lex3 = new ConfigLexem("@at@", "", FormatType.Custom, false);
lex3.FormatName = "Property";
editControl1.Language.Lexems.Add(lex3);

Also adding a lexem using regex such as {{[A-Z]+}} doesn't work either but [A-Z]+ does.