[Gambas-user] Need help with TextEditor

Rolf-Werner Eilert rwe-sse at osnanet.de
Fri Sep 17 15:33:31 CEST 2021


Am 16.09.21 um 19:09 schrieb Bruce Steers:
> 
> 
> On Thu, 16 Sept 2021 at 16:40, Rolf-Werner Eilert <rwe-sse at osnanet.de 
> <mailto:rwe-sse at osnanet.de>> wrote:
> 
>     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.
> http://gambaswiki.org/wiki/comp/gb.eval.highlight/highlight 
> <http://gambaswiki.org/wiki/comp/gb.eval.highlight/highlight>
> 
> 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
> BruceS
> 
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> 

Yes Bruce, thank you very much, that looks like it was what I was 
looking for.

Nice weekend

Rolf



More information about the User mailing list