views:

3888

answers:

1

Our product team has requested custom cursors during drag/drop operations. They have provided me with three images to implement:

  • Open-Hand-Grabber.png: displays when a user hovers over an item that they can drag
  • Closed-Hand-Grabber.png: item is being dragged
  • Closed-Hand-Grabber-No-Drop: item dragged over an area where it cannot be dropped

I have embedded these images into the Flex application and I am now trying to implement the desired behavior.

My first thought was to listen to the drag/drop events and set the cursors using the CursorManager.setCursor() method. This solution seems very code intensive and I feel that there must be an easier way to skin the various drag/drop cursor states.

Any ideas?

+2  A: 

Check out the various cursor styles available on the DragManager class:

copyCursor

defaultDragImageSkin

linkCursor

moveCursor

rejectCursor

http://livedocs.adobe.com/flex/3/langref/mx/managers/DragManager.html

cliff.meyers
OK, 80% there. Added the following to css:DragManager{ moveCursor: Embed(source="resources/images/Closed-Hand-Grabber.png"); rejectCursor: Embed(source="resources/images/Closed-Hand-Grabber-No-Drop.png");}The only thing remaining is the mouseOver cursor...
Got mouseOver working by handling the mouseOver and mouseOut events on the Lists. Perfect!
Do you think you could add the full code as an answer, I have this same problem and can't seem to make it work with what you've posted as a comment. Thanks.
ChrisInCambo