I have a slider with a read-only text box. I’d still like to be able to perform a custom action when the text box is clicked. I can’t find a LookAndFeel, Component, or Slider method I could override or register to make this happen. Thoughts on how to make this happen?
The SliderLabelComp is the class to look for. It was introduced in LookAndFeel_V2 and is inherited to V3 and V4:
You can either override the SliderLabelComp, if the change of behaviour is in the Label only, or if you want to register a listener, you can override createSliderTextBox, where you have access to the created SliderLabelComp instance.
HTH
1 Like
Thanks!
The SliderLabelComp
was private so I made my own class that derives from label. Then my override to createSliderTextBox
returns my implementation instead of SliderLabelComp
. In that class I do:
void mouseUp (const MouseEvent&) override
That’s where I can handle my mouseclick. Thanks for pointing me in the right direction!