TableListBox::setRowSelectedOnMouseDown() not working (JUCE 6.1.6)

Copied code from ListBox::mouseDown() to TableListBox::mouseDown() and it seems to have resolved the issue.

    void mouseDown (const MouseEvent& e) override
        isDragging = false;
        selectRowOnMouseUp = false;

        if (isEnabled())
            if (owner.selectOnMouseDown && ! isSelected && ! viewportWouldScrollOnEvent (owner.getViewport(), e.source))

Code which was identical or similar in ListBox and TableListBox has recently been refactored but I’m also starting to have issues.

In your case, can you try the following: in file modules/juce_gui_basics/widgets/juce_TableListBox.cpp, change line 222 from:

ListBox& getOwner() const { return owner; }


TableListBox& getOwner() const { return owner; }

This is not an ideal solution of course, just helping to understand what’s going on. Thanks!

Sorry, to be clear this is in JUCE 6.1.6. The owner is a TableListBox and there is no getOwner() function

6.1.6 is not maintained. All bug-fixes are currently applied to JUCE 7.

I recommend trying out JUCE 7, as the issue may already be fixed there. If the same issue is still present, then the future fix will be applied to JUCE 7.

The bug exists in 7.0.5 but it looks like TableListBox is undergoing significant change in the develop branch and no longer has an overloaded mouseDown() so hopefully that fixes it