When working with drag&drop in a tree I notice it to be confusing to
have the line as your guide for all operations.  For example if you
wanted to drag an item from 1 node to another, having that line
sometimes suggested that it wouldnt work as intended.  So I wanted to
make it like explorer where it highlights the folder you are
performing the operation on for everything but re-ordering of items.

I'm stuck trying to get the style to update depending on where we are
in the tree.  Does anyone know how to force a style update? This
example only works when you drag your item out of the tree and back
in, but it will change from the highlight to the line and back again.

Full code: http://www.speakeasy.org/~ckovey/flextree.zip

Here's the function in question:

        function doDragOver(event) {
                //itemRollOver=trace"(event.index)"
                
                var dropLoc:Number=event.target.getDropLocation();
                dropLocation.text=dropLoc;
                
                if(dropLoc==0) myTree.dropIndicatorSkin="TreeOrderIndicator";
                else myTree.dropIndicatorSkin="TreeDropIndicator";

                event.target.showDropFeedback();
                if (Key.isDown(Key.CONTROL))
                        event.action = DragManager.COPY;
                else if (Key.isDown(Key.SHIFT))                 
                        event.action = DragManager.LINK;
                else
                        event.action = DragManager.MOVE;
        }


Thanks for any help or pointers in the right direction!





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to