Search code examples
objective-ccocoansscroller

How to change NSScroller color?


I'm trying to change the color of the scroller itself, it seems I need to overwrite something around drawKnob but I couldn't find any method which seemed appropriate.

One way I thought about was to inject a new style and get scroller to use it but again, I couldn't find anything about NSColor in NSScroller header.

Any idea?


Solution

  • I think you will have to write a subclass, and override drawKnob, maybe drawKnobSlotInRect: too depending on what you want to change.