Look And Feel Custom variables

3 Questions.

Is there any way to put some custom value into say a slider so that you can pick it up in a lookAndFeel method that I have overridden?

Is there a way of setting the 12px padding to a different value? e.g. drawLinearSlider will always have a y offset of 12 and height will be component bounds - 2y when you customize L&F_V4

When setNumDecimalPlacesToDisplay(3) and setRange(0, 6, 0.001); if often see values of 0.18 or 0.3 instead of 0.180 and 0.300. Is there any whay to display fixed number of decimal places?

To make the LookAndFeel customizable for our needs I’ve used properties. they’re valuable KVM “batteries-included” in a juce::Component
simply use juce::Component::getProperties()
and then set/get.

I use it for simpler concepts such as different button styling like RoundedLeft, RoundedRight, Circular or similar.
But you can put anything you’d like and if it exists parse it within your LookAndFeel. so that way it is per instance.


Cool, yeah that was the exact context I’m going for, having 3 sets of sliders next to each other and rendering the slider it self slightly differently. Didn’t want to create 3 different L&F subclasses for something so simple.