Help Setting Selection (and other) Colors

Topics: Developer Forum, Project Management Forum, User Forum
Oct 16, 2009 at 2:00 AM

I'd been struggling with setting the selection fore and back colors for the last 2 days when i finally realized that the download release has a bug that had been fixed over a year ago in the code repository (file: Selection.cs) I am surprised that there hasn't been any discussion about it except for the 1 note that lead to the bug fix, doesn't anybody change the default selection colors when creating a custom style? Anyway, after checking out the SVN code, compiling the component and adding that to my project everything worked as expected. I'd like to see a new release made available for download even though not many changes have been checked in since then so that others don't have to go through the extra steps to get a working component. (I'm pretty new at this so maybe it took me much longer to realize that there was actually a fix available in the source code than it might take a more experienced developer.)

Is there anyway to set the Selection fore and back colors in the CustomLocation xml file? I'm working on a custom style using the sql lexer and haven't quite figured out everything that can be changed (or how.) Thanks for any tips! The style so far, I just have the basics working fine and will be fine tuning the exact colors as i go. Any pointers on setting styles would be welcome:

 

    <Styles Inherit="False">
      <Style Name="Default" ForeColor="#dcdccc" BackColor="#3f3f3f"/>
      <Style Name="WORD" ForeColor="#C0BED1"/>
      <Style Name="WORD2" ForeColor="#ffcfa8"/>
      <Style Name="USER1" ForeColor="#efef8f"/>
      <Style Name="USER2" ForeColor="#efef8f"/>
      <Style Name="USER3" ForeColor="#efef8f"/>
      <Style Name="USER4" ForeColor="#efef8f"/>
      <Style Name="SQLPLUS" ForeColor="#dfdfbf"/>
      <Style Name="COMMENT" ForeColor="#7f9f7f"/>
      <Style Name="COMMENTLINE" ForeColor="#7f9f7f"/>
      <Style Name="COMMENTDOC" ForeColor="#7f9f7f"/>
      <Style Name="COMMENTLINEDOC" ForeColor="#7f9f7f"/>
      <Style Name="COMMENTDOCKEYWORD" ForeColor="#7f9f7f"/>
      <Style Name="COMMENTDOCKEYWORDERROR" ForeColor="#7f9f7f"/>
      <Style Name="SQLPLUS_COMMENT" ForeColor="#7f9f7f"/>
      <Style Name="SQLPLUS_PROMPT" ForeColor="#7f9f7f"/>
      <Style Name="NUMBER" ForeColor="#8cd0d3"/>
      <Style Name="OPERATOR" ForeColor="#f0efd0"/>
      <Style Name="STRING" ForeColor="#cc9393"/>
      <Style Name="CHARACTER" ForeColor="#dca3a3"/>
      <Style Name="IDENTIFIER" ForeColor="#efdcbc"/>
      <Style Name="QUOTEDIDENTIFIER" ForeColor="#efdcbc"/>
      <Style Name="LINENUMBER" ForeColor="#dcdccc" BackColor="#3f3f3f"/>
    </Styles>

 

 

Jeremy

Coordinator
Oct 16, 2009 at 2:37 AM

 

<Selection ForeColor="Yellow" BackColor="Red"/>

This doesn't go under the style element, it's a direct child of the Language element. In general the config XML format tends to be pretty close to the object model.

You are correct, a new release is llloooonnggg overdue. This was my fault, I've been the primary developer of this project the past few years but since the 2.0.1 release I took a break from ScintillaNet. I'm back though and am planning to release a new version once all (or at least most) the issues listed in the issues tab are fixed.

 

Oct 16, 2009 at 7:09 AM

Thanks for the quick reply, that's the answer I was searching for. Thanks for your work on ScintillaNet, it's terrific.

Jeremy