I have a
TableListBox (in a plugin project) which I’m allowing rows to be re-ordered with
DragAndDropTarget combo, which is working nicely.
I also can hold down shift when dropping a row to create a copy, which is also working nicely.
What I would like to do is change the mouse cursor to
CopyingCursor whilst shift key is down during the drag operation.
I tried using
setMouseCursor on my
TableListBox but that didn’t work.
The closest I’ve managed to get this working is:
auto mods = ModifierKeys::getCurrentModifiers(); myCursor = MouseCursor(mods.isShiftDown() ? MouseCursor::CopyingCursor : MouseCursor::NormalCursor); Desktop::getInstance().getMainMouseSource().showMouseCursor(myCursor);
but I only see brief flashes of the copying cursor (presumably
DragAndDropContainer is changing the cursor back to default?).
This must be a common thing to do, what have I missed?