TextEditor background

Ask about the individual Gambas components here.
Post Reply
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

TextEditor background

Post by BruceSteers »

Anyone know how to change the TextEditor controls background colour?

Setting the .background property seems to change the background behind the editor view but its main background colour remains white?

Cheers 🙂
If at first you don't succeed , try doing something differently.
BruceS
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: TextEditor background

Post by cage »

Bruce the only way I have been able to change the background was to use GTK. Although some of my programs have had problems using it. You may not run into that problem so give it a try.

Update:
Was playing around and found GTK does not work either. However I tried the QT4 to QT5 switcher and was able to change the background. Hope that helps/
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: TextEditor background

Post by BruceSteers »

Thanks cage , i tried with all combinations of gtk 2 & 3 and qt 4 & 5 and gb.gui the switcher , nada.

I might add it to the bugtracker..
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1521
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: TextEditor background

Post by BruceSteers »

All praise the great Benoît :)
In case anyone wanted the solution..

Code: Select all

TextEditor1.Styles[Highlight.Background].Color = Color
There's many other highlight options too.
Pretty sure i can add to the wiki.
Will try to add some info about the TextEditor to it.
apparently gotta learn the wiki syntax first so here we go, wish me luck ;) lol

Edit. Wasn't too much to it so i've added info about setting Background colour and pointed to the other Highlighting options on the main gambas wiki TextEditor page.

http://gambaswiki.org/wiki/comp/gb.form ... texteditor
If at first you don't succeed , try doing something differently.
BruceS
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: TextEditor background

Post by cage »

Glad you solved the problem. Yes post all you can find out about it. :D
Post Reply