How to change the background color of the Scintilla Gadget? [Resolved]

Just starting out? Need help? Post your questions and find answers here.
phaselock.studio
User
User
Posts: 12
Joined: Wed Apr 13, 2022 10:08 pm
Location: Low Orbit

How to change the background color of the Scintilla Gadget? [Resolved]

Post by phaselock.studio »

Hi everyone,

I'm working on a text editor and would like to use the Scintilla Gadget but am unsure of how to change the background color of the editor. I am able to change the color of the font with #SCI_STYLESETFORE and the font background color with #SCI_STYLESETBACK but that's all I can find.

I did try #SCI_SETWHITESPACEBACK but didn't notice any changes.

Any help would be greatly appreciated. Thank you!
Last edited by phaselock.studio on Sat Apr 16, 2022 5:16 am, edited 1 time in total.
User avatar
jacdelad
Addict
Addict
Posts: 1993
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: How to change the background color of the Scintilla Gadget?

Post by jacdelad »

Code: Select all

ScintillaSendMessage(#Gadget,#SCI_STYLESETBACK,#STYLE_DEFAULT,RGB(255,0,0))
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
phaselock.studio
User
User
Posts: 12
Joined: Wed Apr 13, 2022 10:08 pm
Location: Low Orbit

Re: How to change the background color of the Scintilla Gadget?

Post by phaselock.studio »

jacdelad wrote: Wed Apr 13, 2022 10:33 pm

Code: Select all

ScintillaSendMessage(#Gadget,#SCI_STYLESETBACK,#STYLE_DEFAULT,RGB(255,0,0))
This is great! :D Thank you!

Do you know if it's possible to make the margin disappear in the gadget?

EDIT:

I think I found an answer here: viewtopic.php?t=75000

It looks like the margin can be hidden like this:

Code: Select all

 ScintillaSendMessage(0, #SCI_SETMARGINWIDTHN, 1, 0)
User avatar
jacdelad
Addict
Addict
Posts: 1993
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: How to change the background color of the Scintilla Gadget?

Post by jacdelad »

Yepp, that should work.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Post Reply