TableListBox, custom component and selection

Hi Jules,

I have a TableListBox with a checkbox in some column.
I would like to select the row if I click checkbox as well as the checking the box.

What would be the best way to do this without coding custom component for the rows ?

Like in the Juce demo and the combo box selecting the row when modified.


A TableListBox is also a ListBox, so you can just call ListBox::selectRow() on it… or am I misunderstanding your question?

Well, I was talking more about the simplest mechanism to avoid coding in each component an explicit call to selectRow.
Like some mouse event forwarding or something like that.


What I often do is to call setInterceptsMouseClicks (false, true), so that my child comps get clicked on, but clicks on the background fall through to the listbox.

Yep but changing the combobox in the case of the demo won’t select the row even with this ?

Sorry, yes, I guess that’d only work for listboxes, not for tables. For a table, selecting the row isn’t default behaviour, so you’d need to explicitly select it yourself if you want that to happen.

No problem.

Thanks for your time.