New Slider


#1

Hello,

I am wanting to change the look of the slider and am having a hard time deciding how to proceed. My first stab at it was to super-class the Slider code, but most of the variables in Slider are private, not protected so that makes it a bit more difficult to just create a new paint method. I am sure there are many Juce developers that have already done this, so I was hoping to get some pointers for what you have found worked out best.

Thank you,

David


#2

Take a look at this:
http://www.rawmaterialsoftware.com/juce/api/classLookAndFeel.html

And take a look also at
juce/src/gui/components/lookandfeel/juce_LookAndFeel.h and .cpp

There are some methods, like drawLinearSliderBackground, that are used to change Sliders’ gui.
So if you need to change the appearence of a slider just create your own LookAndFeel, then apply the LookAndFeel to the desired Slider.