JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

Feature/prevent listbox selection addition

Open hbursk opened this issue 6 years ago • 0 comments

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) to ListBoxModel
  • This method return true by default
  • Developer can override this method and conditionally return false when needed to prevent the click from updating selection.

hbursk avatar Oct 15 '19 17:10 hbursk