You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
siegi44 edited this page Nov 20, 2007
·
7 revisions
Basics
The Texteditor uses socalled "XML Syntaxhightlighting Definition" (*.xshd) files to define a set of syntaxhighlighting rules.
Attach a syntaxhighlighting to the Text editor
To attach a syntaxhighlighting to the editor use following code:
{{ string dir = "ressources\highlighting\"; // Insert the path to your xshd-files. FileSyntaxModeProvider fsmProvider; // Provider if (Directory.Exists(dir)) { fsmProvider = new FileSyntaxModeProvider(dir); // Create new provider with the highlighting directory. HighlightingManager.Manager.AddSyntaxModeFileProvider(fsmProvider); // Attach to the text editor. txtSQL.SetHighlighting("YourHighlighting"); // Activate the highlighting, use the name from the SyntaxDefinition node. } }}