Slider TextBox Look and Feel

Hi,

I don’t see a look and feel method to edit the actual shape of slider textboxes. I want to round the corners of them. Any suggestions?

Thanks…

It’s a Label member, you need to override LookAndFeel::drawLabel(…).

Ah, thanks Dave.

Ok I’m able to change the l+f of labels. But how do I change just the slider labels without affecting the others…can I use something like

if (label is attached to Slider)…then bla bla bla…

Thanks!

Just apply your custom look and feel to your sliders only e.g.

slider.setLookAndFeel (&sliderLookAndFeel);

I’ll try that Dave. Although I have all of my custom Look and Feel stuff in one class so I was hoping to just put an if statement in the Label l+f. I suppose I can create a separate one for sliders. Thanks…

I haven’t really looked into it but I suppose you might be able to use Component::findParentComponentOfClass in the drawLabel method and see if that returns a valid pointer?

Got it to work with the following…

Component* comp = label.getParentComponent();
if (dynamic_cast<Slider*>(comp)) //if it is a slider
{
//do whatever her

}

Thanks

Shouldn’t that be

?

juce wiki…