Just a thought, as I haven't tried the method you described. What about
setting the styles of the cursor on mouse down?

var styleSheet:CSSStyleDeclaration =
StyleManager.getStyleDeclaration("DragManager");
styleSheet.setStyle("moveCursor", grabCursor);

or

styleSheet.setStyle("copyCursor", grabCursor);

And you could set it back on mouse up. Just a thought because maybe
DragManager is setting things back to what it has set in its styles.


On Thu, Dec 17, 2009 at 8:19 AM, invertedspear <invertedsp...@yahoo.com>wrote:

>
>
> I have a datagrid that I want the user to sort the rows on. To make it
> obvious that it's sortable I am implementing some custom cursors. But I'm
> having a problem when I actually drag an item. Can anyone help me out?
>
> Thanks
>
> here's a psuedo demonstration of the problem
>
> Application = normal cursor // fine
>
> Rollover datagrid = open hand cursor // good so far
>
> mousedown on datagrid = closed hand cursor // good
>
> dragging item around = closed hand cursor // switches back to normal cursor
> (if I move it around real fast I can see my custom curser for an instant)
>
> mouse up on datadrid = open hand cursor // not sure, after I drop it goes
> back to open hand but if I mouse down, dont move and mouse up I have a
> closed hand
>
> rollout of datagrid = normal cursor //good
>
> datagrid code:
>
> <mx:DataGrid id="sectQuestionsDG" x="10" y="204" width="558" height="277"
> headerHeight="0" selectable="{editMode}"
> dragMoveEnabled="{editMode}" dragEnabled="{editMode}"
> dropEnabled="{editMode}"
> dragDrop="sectQuestReOrder(event);" rollOver="over();" mouseDown="down();"
> mouseUp="up();" rollOut="out();"/>
>
> functions:
>
> public function over():void{
> CursorManager.setCursor(grabCursor,CursorManagerPriority.LOW,0,0);
> }
> public function down():void{
> CursorManager.setCursor(grabbingCursor,CursorManagerPriority.HIGH,0,0);
> }
> public function up():void{
> CursorManager.setCursor(grabCursor,CursorManagerPriority.LOW,0,0);
> }
> public function out():void{
> CursorManager.removeAllCursors();
> }
>
>  
>

Reply via email to