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!
How to change the background color of the Scintilla Gadget? [Resolved]
-
- 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]
Last edited by phaselock.studio on Sat Apr 16, 2022 5:16 am, edited 1 time in total.
Re: How to change the background color of the Scintilla Gadget?
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
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
-
- 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?
This is great!jacdelad wrote: Wed Apr 13, 2022 10:33 pmCode: Select all
ScintillaSendMessage(#Gadget,#SCI_STYLESETBACK,#STYLE_DEFAULT,RGB(255,0,0))

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?
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
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD