How To Override ComboBox::getTooltip()


#1

I’m trying to override ComboBox::getTooltip(). I’m finding that I can override Slider::getTooltip() without a problem, but not ComboBox::getTooltip(), which just ignores my override.

// Works

class MySlider : public Slider
{
public:
    MySlider (const String& name) : Slider (name) {};
    ~MySlider () {};
        
    String getTooltip () override
    {
        return getTextFromValue (Slider::getValue ());
    }
};

// Doesn’t work

class MyComboBox : public ComboBox
{
public:
    MyComboBox (const String& name) : ComboBox (name) {};
    ~MyComboBox () {};

    String getTooltip () override
    {
        return ComboBox::getText ();
    }
};

Could someone tell me how to get this to work?