ScintillaControl Set Language

Jan 22, 2008 at 6:17 PM
Edited Jan 22, 2008 at 6:18 PM
I'm a long time user of SciTe, and would like to implement the ScintillaControl to format XML and SQL in an app.

I've download the latest SciDe source and looked at it, the only thing i see being set in the menu option is FileEditorDockContent.cs line 318:

scintillaEditor.ConfigurationLanguage = menuItem.Tag.ToString(); //which for me is "xml"

although I've done the same in my own app, it is not parsing.

what am I missing? I really have tried to look through the code but don't see the answer.

I'm coding in VS 2005.

Jan 22, 2008 at 6:46 PM
found it, have to load the config file...

FileInfo exeFile = new FileInfo(Application.ExecutablePath);
FileInfo globalConfigFile = new FileInfo(exeFile.Directory.FullName + @"\Configuration\");
if (globalConfigFile.Exists)
properties = new SciTEProperties();
scintillaConfig = new ScintillaConfig(properties);// if using multiple controls keep in a global location
apply scintillaConfig to the local control, then scintillaEditor.ConfigurationLanguage works as expected.