Maybe the dragOver event keeps firing
though every time the cell changes? I’m sure there must be something
firing that you could use as a trigger. Matt From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Krueger Unfortunately I just tried to do something
like this. The itemRollOver doesn’t fire when you are dragging over
a itemL Jeff From: Maybe you could add a itemRollOver handler
on the Tree so that when you are dragging (indicated by dragEnter I guess) and
you encounter a branch you could make sure the branch gets opened? Matt From: All,
I am trying to drag an item from a grid and drop it on a tree control. I
have found that the getDropParent seems to be the best bet when trying to find
where to add a new child node to. The only problem I am having is if the
user chooses to drop the item on a branch that is currently closed, the
getDropParent() call returns one level higher. If the branch is set to
open even with no children nodes then everything works. I can kind of
understand why it works like this, but is there a way to work around
this. Below is my dragDrop method, pretty much what everyone else has
posted. I could expand all branches when the drag begins but that could
be ugly. public function
doDragDrop(event:Object)
{
doDragExit( event);
var dragItems = event.dragSource.dataForFormat(
"items" );
var targetForDrop = tree.getDropParent();
for ( var i = 0; i <dragItems.length; i++)
{
targetForDrop.addTreeNode("test",dragItems[i]);
tree.setIsOpen(targetForDrop, true);
tree.selectItem(targetForDrop, true); } } Thanks Jeff
SPONSORED
LINKS
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com ---- LSpots keywords ?> ---- HM ADS ?> YAHOO! GROUPS LINKS
|