Page 1 of 1

Scintilla scrollbar

Posted: Sat Sep 20, 2025 6:01 pm
by rndrei
How to change the color of the scrollbar in scintilla?

Re: Scintilla scrollbar

Posted: Wed Oct 08, 2025 8:48 am
by rndrei
Why doesn't it work?

Code: Select all

#SCI_SETSCROLLTRACK = 2265
#SCI_SETSCROLLTHUMB = 2266
#SCI_SETSCROLLARROW = 2264
#SC=10
If OpenWindow(0, 200, 200, 520, 500, "change color scrollbar" ,#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
  ScintillaGadget(#SC, 0, 0,200, 200, #Null)
  ScintillaSendMessage(#SC,#SCI_SETSCROLLTRACK, 0, $2E2E2E)   
  ScintillaSendMessage(#SC,#SCI_SETSCROLLTHUMB, 0, $00A0FF)   
  ScintillaSendMessage(#SC,#SCI_SETSCROLLARROW, 0, $FFFFFF) 
  ScintillaSendMessage(#SC,#SCI_SETSCROLLWIDTH, 0, 0) 
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_CloseWindow
        Break
    EndSelect
  ForEver
EndIf

Re: Scintilla scrollbar

Posted: Wed Oct 08, 2025 9:48 am
by Shardik
rndrei wrote: Sat Sep 20, 2025 6:01 pm How to change the color of the scrollbar in scintilla?
It seems that coloring Scintilla scrollbars is not possible:

- ScintillaNET
xv wrote: You cannot. Scintilla uses the default system scrollbars, so their style is determined directly by the operating system.

The only way to style them is to modify the code of C++ Scintilla to implement a custom scrollbar, then you could probably compile the modified library to use it in ScintillaNET.
- Notepad++ (uses Scintilla)
Ekopalypse wrote:Afaik you can not change the color easily.

The only option is to change it system-wide.

Perhaps a creative mind like RASHAD might be able to find a solution for you!