Capture mouseUp in ListBoxComponent

Hi there !

I would like to use a single click for row selection but still be able to drag the rows away. To avoid the ListBox content from being changed when a user tries to drag (mouseDown), I need to only drill down on mouseUp. The idea is:

  1. mouseDown: select row
  2. mouseUp: if not dragging, drill down (update ListBox content)

Is this possible ?

Anything’s possible if you write a custom row component, because you can write the mouse event handler for it.

Thanks for the reply.

I did not notice that ListBoxModel::refreshComponentForRow is also used to return new instances of the custom component.

Dead simple.