[Gambas-user] HTML Tags in TextEditor is always foreground black

Benoît Minisini g4mba5 at gmail.com
Thu Feb 10 11:29:08 CET 2022


Le 10/02/2022 à 09:19, Martin Belmonte a écrit :
> El 10/2/22 a las 1:34, Benoît Minisini escribió:
>> MyTheme = ThemeHighlighterTheme.Load(<path to theme file>)
>> You get a ThemeHighlighterTheme object that you assign to your editor:
>> MyEditor.Theme = MyTheme
>> The 'ThemeHighlighterTheme.Load()' method takes care of not completely 
>> defined theme file like 'zen.theme', and try to assign to non-defined 
>> colors the other colors of the theme.
> 
> ok, perfect, solved. But for TextEditor... The method is 
> TextHighlighterTheme.Load() and not ThemeHighlighterTheme.Load() right?
> 
> Public Sub AplyTheme(Optional strPath As String)
>    Dim hTheme As TextHighlighterTheme
>    If Application.DarkTheme Then
>      hTheme = TextHighlighterTheme.Load("./editor-themes/dark.theme")
>    Else
>      hTheme = TextHighlighterTheme.Load("./editor-themes/zen.theme")
>    Endif
>    TextEditor1.Theme = hTheme
> End
> 
> Thanks.
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

Yes, of course!

-- 
Benoît Minisini


More information about the User mailing list