ScintillaNet style list

Oct 18, 2012 at 7:35 AM

Hi,

I am writing a software using ScintillaNET. My main aim is to get the same PHP styles as Notepad++ but I don't know how to. Setting files in Notepad++ is different from ScintillaNET. Does anybody have an idea how to do it completely the same? Or else is there complete a list of ScintillaNET Style types? For example: 

 <Style Name="CHARACTER" ForeColor="Black" BackColor="Red"/>

What other things can be used like "CHARACTER"? Is there a complete list?

 

Many thanks

Coordinator
Oct 19, 2012 at 4:14 AM

http://scintillanet.codeplex.com/SourceControl/changeset/view/99922#1941400

The link above is a map between PHP style names and their respective indexes. With that information it should be as easy as:

scintilla.Styles[0].ForeColor = Colors.Red;

to set the style properties. (substitute the style index appropriately)

Jacob

Nov 1, 2012 at 2:48 PM

I understand the list but how will the ScintillaNET.xml look like?

mine is currently in pascal setting in language property and my ScintillaNET.xml looks like:

 

<?xml version="1.0" encoding="utf-8" ?>
<ScintillaNET>
	<Language Name="default">
		<Styles>
			<Style Name="Default" FontName="Consolas"/>
		</Styles>
	</Language>

	<Language Name="pascal">
		<Indentation TabWidth="2" UseTabs="false"/>
		<Lexer StreamCommentPrefix="{ " StreamCommentSuffix=" }">
			<Keywords List="0">var</Keywords>
			<Keywords List="1">string</Keywords>
		</Lexer>
		<Styles>
			<Style Name="CHARACTER" ForeColor="Black" BackColor="Red"/>
		</Styles>
	</Language>
</ScintillaNET>

 

 

I am confused. Will I use this in the c# code or ScintillaNet.xml?

 

Many thanks and sorry for too much asking

Nov 6, 2012 at 8:35 AM

I had a look at http://scintillanet.codeplex.com/wikipage?title=HowToSyntax&referringTitle=Documentation

and according to the written information there, ConfigurationManager.Language property should accept phpscript. I tried it but none of the syntax is highlighted. Am I missing anything??

 

Coordinator
Nov 7, 2012 at 11:48 PM

Try setting the ConfigurationManager.Language property to "html". It has support for embedded PHP blocks and may get you what you're looking for.

Jacob

Nov 16, 2012 at 6:43 AM

Thanks for your reply. Now I get how it works. I set language property to html, created an XML file and specify only the ones need to be changed. The rest of styles come from html defaults. It works like charm. Thank you for all your help.