TextEditor background

Post Reply
User avatar
BruceSteers
Posts: 91
Joined: Thursday 23rd July 2020 5:20pm

TextEditor background

Post by BruceSteers » Wednesday 09th September 2020 1:02pm

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 it differently.

cage
Posts: 76
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: TextEditor background

Post by cage » Friday 11th September 2020 3:14am

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: 91
Joined: Thursday 23rd July 2020 5:20pm

Re: TextEditor background

Post by BruceSteers » Friday 11th September 2020 9:43am

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 it differently.

User avatar
BruceSteers
Posts: 91
Joined: Thursday 23rd July 2020 5:20pm

Re: TextEditor background

Post by BruceSteers » Friday 11th September 2020 7:29pm

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 it differently.

cage
Posts: 76
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: TextEditor background

Post by cage » Saturday 12th September 2020 4:25am

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

Post Reply