Page 1 of 1

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

Posted: Wed Apr 13, 2022 10:16 pm
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!

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

Posted: Wed Apr 13, 2022 10:33 pm
by jacdelad

Code: Select all

ScintillaSendMessage(#Gadget,#SCI_STYLESETBACK,#STYLE_DEFAULT,RGB(255,0,0))

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

Posted: Thu Apr 14, 2022 3:29 am
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)

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

Posted: Thu Apr 14, 2022 4:02 am
by jacdelad
Yepp, that should work.