Slider popupDisplay questions

I was testing it in the demo app’s widgets page, where it does work as I think you’d expect it to… Are you saying that the behaviour in the demo app is wrong, or that it’s not working when used in a plugin?

I didn’t test the demo app… I simply replaced my code with yours (with the changes to setPopupDisplayEnabled()) and tried to see if it would be a drop in replacement… but unfortunately it rarely works in my plug-in on any of the Sliders.

EDIT: Yes, it works fine in your demo on the “mickles in a muckle” Slider… but not in my plug-in.

Cheers,

Rail

To get this to work I had to make a change to your mouseMove() method:

void mouseMove()
{
    if (showPopupOnHover
         && style != TwoValueHorizontal
         && style != TwoValueVertical)
    {
        if (owner.isMouseOver (true) /* && owner.getTopLevelComponent()->hasKeyboardFocus (true) */)
        {
            if (popupDisplay == nullptr)
                showPopupDisplay();

            if (popupDisplay != nullptr)
                popupDisplay->startTimer (2000);
        }
    }
}

My Sliders don’t have any text entry components.

Also, wouldn’t this be better in mouseEnter() so you get less hits on the method?

Cheers,

Rail

FYI I’ve updated this. Thanks!

3 Likes