[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TextEditor highlighter, setting color
[Thread Prev] | [Thread Next]
- Subject: Re: TextEditor highlighter, setting color
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Mon, 22 Dec 2025 16:09:55 +0000
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On Mon, 22 Dec 2025 at 15:57, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:
> Le 21/12/2025 à 01:00, Bruce Steers a écrit :
> > I seem to not be able to set TextEditor colors using the
> > Theme[Key].Color property?
> >
> > Public Sub ColorChooser1_Change()
> >
> > If cmboStates.Text = "Background" Then
> > TextEditor1.Background = ColorChooser1.Value
> > Else
> > TextEditor1.Theme[cmboStates.Text].Color = ColorChooser1.Value
> > Endif
> >
> > TextEditor1.Refresh
> >
> > End
> >
> > attached is a simple application that "should" allow changing the
> > highlight modes colors.
> >
> > it seems "reading" TextEditor1.Theme[cmboStates.Text].Color works as the
> > colors show on the ColorChooser when you select a State but writing the
> > property does not seem to do anything on the gambas highlighting?
> >
> > Or am i missing a trick?
> >
> > Respects
> > BruceS
> >
>
> The bug should be fixed in the last commit.
>
> Regards,
>
> --
> Benoît Minisini.
Thanks Benoit but it's still not working here.
not without my workaround.
Public Sub ColorChooser1_Change()
If cmboStates.Text = "Background" Then
TextEditor1.Background = ColorChooser1.Value
Else
TextEditor1.Theme[cmboStates.Text].Color = ColorChooser1.Value
TextEditor1.Theme = TextEditor1.Theme.Copy() ' doesn't work without this
Endif
TextEditor1.Refresh
End
Respects
BruceS
| Re: TextEditor highlighter, setting color | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
| TextEditor highlighter, setting color | Bruce Steers <bsteers4@xxxxxxxxx> |
| Re: TextEditor highlighter, setting color | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |