Scintilla scrollbar

Mac OSX specific forum
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 175
Joined: Thu Dec 28, 2023 9:04 pm

Scintilla scrollbar

Post by rndrei »

How to change the color of the scrollbar in scintilla?
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 175
Joined: Thu Dec 28, 2023 9:04 pm

Re: Scintilla scrollbar

Post 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
User avatar
Shardik
Addict
Addict
Posts: 2065
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: Scintilla scrollbar

Post 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!
Collection of cross-platform examples with API functions to extend PureBasic
Post Reply