Per your original question with the "drop lines", there's a method
called showDropFeedback() you can override.  In the Flex Tree
implementation, most of the work is done in a private function,
updateDropData, so check that out for what you want to do.

I'm not too familiar with the dragComplete mechanism, but it looks
like it should get fired by DragProxy in the mouseUpHandler there, so
you can see what's going on/why it's not getting fired.  Some of the
Flex Tree code relies on this, so I'm curious what's going on.

In the dragComplete event, "event.dragInitiator" will give you the
tree you're dropping from.  "this" is the tree you're dropping on to.

HTH,
Ryan

--- In flexcoders@yahoogroups.com, "Rafael Faria"
<[EMAIL PROTECTED]> wrote:
>
> How can i get the Tree control i'm dropping at the DragComplete?
> 
> raf
> 
> --- In flexcoders@yahoogroups.com, "Rafael Faria"
> <rafaelfaria.grupos@> wrote:
> >
> > I read that too but the thing is i need to perform an action after i
> > drop the element, not ondrop. This text suggest that if i'm draging
> > from one tree control to another i should use "dragcomplete" but
> > extending the tree component, i add the following line to the
> constructor
> > 
> >            
> addEventListener(DragEvent.DRAG_COMPLETE,handleDragComplete);
> > 
> > whenever i drag and drop items within the same tree control it fires
> > handleDragComplete function, if i drop from another one, it doesnt.
> > 
> > 
> > To clarify more, i need to perform an action after i insert an element
> > from another tree to my main tree. How i would do that? DRAG_COMPLETE
> > does the job whithin the same tree control but not sure what i could
> > use to perform an event after the item is inserted at the tree
control.
> > 
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, Sherif Abdou <sherif626@> wrote:
> > >
> > > off the flex documentation
> > > * <p>Because of the way data to a Tree control is structured, 
> > > * the Tree control handles drag and drop differently from the other
> > list-based controls. 
> > > * For the Tree control, the event handler for the
> > <code>dragDrop</code> event 
> > > * only performs an action when you move or copy data in the same
> > Tree control, 
> > > * or copy data to another Tree control. 
> > > * If you drag data from one Tree control and drop it onto another
> > Tree control 
> > > * to move the data, the event handler for the
> > <code>dragComplete</code> event 
> > > * actually performs the work to add the data to the destination Tree
> > control, 
> > > * rather than the event handler for the dragDrop event, 
> > > * and also removes the data from the source Tree control. 
> > > * This is necessary because to reparent the data being moved, 
> > > * Flex must remove it first from the source Tree control.</p>
> > > 
> > > Is this what you were sort of asking?
> > > 
> > > 
> > > 
> > > ----- Original Message ----
> > > From: Rafael Faria <rafaelfaria.grupos@>
> > > To: flexcoders@yahoogroups.com
> > > Sent: Monday, February 18, 2008 5:20:03 PM
> > > Subject: [flexcoders] Re: Extending Tree component
> > > 
> > > you mean showDropFeedback?
> > > 
> > > Another problem im having is, whenever you try to drop from one tree
> > > to another, the event DRAG_COMPLETE or DRAG_EXIT does not works. Any
> > > explanation?
> > > 
> > > Alex?
> > > 
> > > --- In [EMAIL PROTECTED] ups.com, Sherif Abdou <sherif626@ ..>
> wrote:
> > > >
> > > > yes just use a style on it to hide it or just remove it
> > > > dropIndicatorSkin= "{mx.skins. ProgrammaticSkin }"
> > > > or call showFeedBack( ) and hideFeedback( )
> > > > 
> > > > 
> > > > 
> > > > ----- Original Message ----
> > > > From: Rafael Faria <rafaelfaria. grupos@ .>
> > > > To: [EMAIL PROTECTED] ups.com
> > > > Sent: Monday, February 18, 2008 4:37:17 PM
> > > > Subject: [flexcoders] Re: Extending Tree component
> > > > 
> > > > Nobody?
> > > > 
> > > > --- In [EMAIL PROTECTED] ups.com, "Rafael Faria"
> > > > <rafaelfaria. grupos@ .> wrote:
> > > > >
> > > > > I'm extending the Tree component and i have had some great
> progress
> > > > > with it.
> > > > > 
> > > > > Somethings still bug me like the place you will drop the item.
> > > > > Whenever you drag an item, a thick black line show marking where
> > will
> > > > > be drop it. The thing is, sometimes i'm positioning the
> element over
> > > > > the element i want to drop and the line is still on the item
above
> > > it. 
> > > > > 
> > > > > The line i'm mentioning is this one: http://www.rafaelfa
> > > ria.net/tree. png
> > > > > 
> > > > > Is there any way to controle this line? I mean, is there any
> way to
> > > > > choose exactly the item i want to drop it?
> > > > > 
> > > > > Thanks
> > > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > ____________ _________ _________ _________ _________ _________ _
> > > > Never miss a thing. Make Yahoo your home page. 
> > > > http://www.yahoo. com/r/hs
> > > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >      
> >
>
____________________________________________________________________________________
> > > Never miss a thing.  Make Yahoo your home page. 
> > > http://www.yahoo.com/r/hs
> > >
> >
>


Reply via email to