Hi there,
I have a question regarding the creation of custom components with Juce. I wanted to have special behavior for the horizontal sliders, so I created a custom LookAndFeel class, derived from the base class, and I’ve overriden drawLinearSlider to do exactly what I wanted.
This worked great, but now I would like to have a second kind of horizontal sliders, which would use the same properties as the default horizontal slider but differently, by using the custom LookAndFeel class again. So I thought about creating a custom Slider class, derived from the standard Slider class from Juce, and then override the SliderStyle enum and some other methods to achieve this goal.
But when doing that, I realized I couldn’t override the functions I wanted because those (Slider::paint for instance) were accessing private variables from the Slider class, and my custom class does not have rights to access them.
Could you tell me what would be the best method to create other kinds of sliders, using the same properties as the standard sliders? (I really just want to have “two” different horizontal sliders here) Am I doing this the wrong way?
Thanks a lot in advance for your help. I’ve been using Juce for a few weeks now, it’s really useful and a lot of fun too!
Vincent D.