Change sliders text box position

Hello everyone!

Does anyone know where the sliders text box position is calculated? I can’t seem to find it in the LookAndFeel classes though I believe it’s in there somewhere.
My goal is to have the text between the blue lines.
So far I was able to set the font/font size but not the position.
I tried to modify the “textArea” variable in the drawLabel() method that I have overriden in my own LookAndFeel derived class. Unfortunately the X and Y position that I read from the “textArea” was something like X=5 Y=1 which tells me It’s relative to some parent component but I can’t seem to find it.

problem

That is defined in the Slider::SliderLayout.

You change it by overriding the LookAndFeel::getSliderLayout()

Hope that helps

1 Like

And help it does :slight_smile: Thank you sir!

solution

Hello Daniel, when I change my text box rectangle using this method it eliminates the sliders themselves. When I set bounds for the slider itself with this method the sizing does not match what I put in my component. It also gets rid of the text box completely.

Can you post your code? It worked perfectly fine for me. If something “disappears” when you move components around you probably just moved it out of bounds of the parent component.