JUCE
JUCE copied to clipboard
Feature/prevent listbox selection addition
What
There's been several use cases where I've wanted to prevent the ListBox from updating it's selection, and then prompt the user with an alternate path, like saving their work or discarding.
How
- Add
bool shouldSelectedRowsChange(int)toListBoxModel - This method
return trueby default - Developer can override this method and conditionally
return falsewhen needed to prevent the click from updating selection.