I'm having difficulty with the drop part of the drag and drop in a Tree
in B3.
I have my tree defined this way:
<mx:Tree id="myTree"
dataProvider="{myTreeData}"
dragEnter="doDragEnterTree(event);"
dragDrop="doDragDropTree(event);"/>
And I have this method for dragDrop:
private function doDragDropTree(event:DragEvent):void {
trace("DROP IN TREE index:" + myTree.calculateDropIndex(event));
}
This works well. My problem is: I want to know WHERE exacty the drop was
fired (where did the user released the mouse button) to know where the
insert my new item. The calculateDropIndex works well for List type
components, but for a Tree it is useless. It returns a level number.
In B2 the Tree had a method Tree.getDropParent(event), I suppose this
returned what I was looking for, but in B3 the Tree has no such a
method. In "Flex Beta 2 to Beta 3 Changes" it says:
Tree.getDropParent(event) - Use Tree.getParentItem(item:Object):*.
But I don't understand the logic here. getParentItem() has as parameter
item:Object, and I don't kno that, I know just an event, I want to find
out the item:Object.
What is the solution here?
Thanks for your help!
Andi
PS. My messages appear on the list with more than 8 hours delay !!!! Why?
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

