RE: [flexcoders] Using a drag proxy

2005-05-26 Thread Matt Chotin










Note that overriding the dragImage getter is
undocumented/unsupported/use-at-your-own-risk…

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Manish
 Jethani
Sent: Thursday, May 26, 2005 2:07
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Using a
drag proxy



 

On 5/26/05, digital_eyezed <[EMAIL PROTECTED]> wrote:

> I have a fully functioning drag and drop
operation going on. All I
> want to do is add an image using the drag
proxy functionality to the
> application.
> 
> Here is the tree I drag from:
> 
> 
> height="100%"
dragEnabled="true"/>
[...]

You can do it by making your own drag proxy. 
See example below.


http://www.macromedia.com/2003/mxml"
  xmlns="*"
backgroundColor="white">
  
    
  
   

   

  
    
  


// MyTree.as
class MyTree extends mx.controls.Tree
{
  function get
dragImage()
  {
 
  return MyDragProxy;
  }
}

//MyDragProxy.as
class MyDragProxy extends
mx.controls.listclasses.DragProxy
{
  public function
createChildren():Void
  {
 
  super.createChildren();

 
  var label = createClassObject(mx.controls.Label,
"",
getNextHighestDepth(), {text: "Watch me
move"});
 
  label.y += 20;
  }
}

You can put your image in createChildren()












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 the Yahoo! Terms of Service.












Re: [flexcoders] Using a drag proxy

2005-05-26 Thread Manish Jethani
On 5/26/05, digital_eyezed <[EMAIL PROTECTED]> wrote:

> I have a fully functioning drag and drop operation going on. All I
> want to do is add an image using the drag proxy functionality to the
> application.
> 
> Here is the tree I drag from:
> 
>  height="100%" dragEnabled="true"/>
[...]

You can do it by making your own drag proxy.  See example below.


http://www.macromedia.com/2003/mxml";
  xmlns="*" backgroundColor="white">
  

  


  

  


// MyTree.as
class MyTree extends mx.controls.Tree
{
function get dragImage()
{
return MyDragProxy;
}
}

//MyDragProxy.as
class MyDragProxy extends mx.controls.listclasses.DragProxy
{
public function createChildren():Void
{
super.createChildren();

var label = createClassObject(mx.controls.Label, "",
getNextHighestDepth(), {text: "Watch me move"});
label.y += 20;
}
}

You can put your image in createChildren()


 
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/