Displaying Values in Sliders as percentages

Im sure this has been encountered a zillion times before.
I have a parameter that can range between 0 and 1, but I want the slider to display the value as 0-100%.

Is there a simple way to do this? Sure would be nice if you could apply a format string to the displayed value

slider->textFromValueFunction = [] ( double val ) {
   return juce::String::formatted ( "%d%%", int ( val * 100.0 ) );
};
1 Like

yesss!!! thank you so much, I knew it had to be something simple