Discussion:
Manually coloring text
Chad Wilson
2013-12-09 13:00:26 UTC
Permalink
Hello,

Hopefully this has not been covered somewhere, but I have not been able to
find it. I have been using the SciLexer.dll control for a couple years and
up until now I have not needed more than 20 different styles but I am
trying to write an IRC client with it and I need some more flexibility with
colors. I have custom styles for operators, voice, normal users, main
text, urls, and text marked as bold but there are also codes for adding
colors to regular text. There is the option to have 16 different colors
with 16 different backgrounds for a total of 256 combinations of
foreground/background styles and I have only been able to access 31
different styles.

I was wondering if there was a way to color text with a
foreground/background color scheme without having to use SCI_STARTSTYLING
AND SCI_SETSTYLING? With the custom colors that I am using I am pretty
much adding each word to the document individually so it would not be too
difficult to add a few extra lines to it. Thank you in advance for any
help you can give.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-12-10 10:56:37 UTC
Permalink
There is the option to have 16 different colors with 16 different backgrounds for a total of 256 combinations of foreground/background styles and I have only been able to access 31 different styles.
SCI_SETSTYLEBITS(8)
http://www.scintilla.org/ScintillaDoc.html#SCI_SETSTYLEBITS

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Chad Wilson
2013-12-12 07:15:08 UTC
Permalink
one last quick question, is there a way to set bold, italic or underline
states of individual characters without having to use a style?

Thank you for your time.
There is the option to have 16 different colors with 16 different
backgrounds for a total of 256 combinations of foreground/background styles
and I have only been able to access 31 different styles.
SCI_SETSTYLEBITS(8)
http://www.scintilla.org/ScintillaDoc.html#SCI_SETSTYLEBITS
Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-12-15 10:17:50 UTC
Permalink
one last quick question, is there a way to set bold, italic or underline states of individual characters without having to use a style?
There is an underline indicator but bold and italics can only be set in styles.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Chad Wilson
2013-12-15 13:21:26 UTC
Permalink
Thank you very much :) I have figured a way around the problem that I was
having. Using 119 styles (7 for all combinations of bold, italic, and
underline X 17 colors) (16 colors + 1 custom color) and then using 16
rectangle/background indicators per color. Doing it this way actually
leaves me with quite a few styles left over.

I also wanted to thank you again for making this amazing control. I have
used it for a couple projects now and they are much better for it.
Post by Chad Wilson
Post by Chad Wilson
one last quick question, is there a way to set bold, italic or underline
states of individual characters without having to use a style?
There is an underline indicator but bold and italics can only be set in styles.
Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...