Get Acess to the "valueBox" Label of the Slider Component


#1

Hello

Hello

i’d like to popup a “Numerical Pad” Custom Component when the user clicks into the text entry box that can be part of the Slider. The problem is that there’s currently no access method to the ScopedPointer valueBox.
Would it be possible to add a function to get Acess to the “valueBox” Label of the Slider Component ?

Thanks in advance
All the best
David


#2

LookAndFeel::createSliderTextBox() ?


#3

thanks for the suggestion but in your code it rebuilds a new Label indeed :

Label* LookAndFeel::createSliderTextBox (Slider& slider)
{
    Label* const l = new SliderLabelComp();
    l->setJustificationType (Justification::centred);
   (...)
    l->setColour (TextEditor::outlineColourId, slider.findColour (Slider::textBoxOutlineColourId));
    return l;
}

so i can’t put a listener on it.


#4

You can overload that lookandfeel method to return anything you like!


#5

i agree. it’s not the straightest way. but it will do it.
thanks