[Gambas-user] Need help with TextEditor

Bruce Steers bsteers4 at gmail.com
Thu Sep 16 19:09:21 CEST 2021

On Thu, 16 Sept 2021 at 16:40, Rolf-Werner Eilert <rwe-sse at osnanet.de>

> Thank you for the links, Bruce. I browsed through several source files,
> and think I understood the principle.
> What I miss is, how do I tell the highlighter which style is which color?
> In the HTML code for instance there is
> Add(sQuote, Highlight.String)
> But where is a definition for the color for Highlight.String? I remember
> in the old editor, I had to define colors for these.
> If I get that to run, I guess I could do the rest by code. In my case
> it's only two colors other than "Normal", one for "command" and one for
> "string".
> Regards
> Rolf

You set the texts highlight style with Add()
there are various highlight styles to choose from.
al the constants listed on this page.

by setting it's style you set whet colour it will be displayed as as per
the theme.

for example..
TextEditor1.Styles[Highlight.Operator].Color = Color.Green
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210916/73b3ad30/attachment.htm>

More information about the User mailing list