I think if you wanted to modify the default drag proxy you could subclass
DataGrid and override the get dragImage function, which looks like this (in
Flex 2.01)

    override protected function get dragImage():IUIComponent
    {
        var image:DataGridDragProxy = new DataGridDragProxy();
        image.owner = this;
        return image;
    }

You could subclass the DataGridDragProxy and then add your labels or
whatever else you wanted, and return a new instance of that class in get
dragImage

On Mon, May 12, 2008 at 9:04 AM, nwebb <[EMAIL PROTECTED]> wrote:

>   Hi Douglas,
>
> thanks for the reply - yeah that's pretty much what I have at the moment
> (I capture the data on MouseDown and create/display a Label on MouseMove),
> but I thought it could be a little cleaner and so I was hoping I could
> access the current dragProxy, use the existing data within it, all within
> the MouseMove method.
>
> This is what I currently have:
>
> //Capture the row data when the user clicks on an item...
> private function dropZoneMouseDown(event:MouseEvent):void
> {
>     var selectedData:XML = DataGrid(event.currentTarget).selectedItem as
> XML;
>     _lastSelectedName = [EMAIL PROTECTED];
>     _lastSelectedAge = [EMAIL PROTECTED];
> }
>
> private function dropZoneMouseMove(event:MouseEvent):void
> {
>     var dragInitiator:IUIComponent = event.target as IUIComponent;
>     var dragSource:DragSource = new DragSource();
>     var dragProxy:Label = _dragLabel;
>     dragProxy.text = _lastSelectedName + "  " + _lastSelectedAge;
>     DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);
>  }
>
> Cheers,
> Neil
>
>
>
>
> On Mon, May 12, 2008 at 2:41 PM, Douglas Knudsen <[EMAIL PROTECTED]>
> wrote:
>
> >   perhaps you can create a Label with the text from these twocolumns and
> > then use this method
> > http://livedocs.adobe.com/flex/3/html/dragdrop_7.html#226768
> >
> > DK
> >
> >
> > On Mon, May 12, 2008 at 8:40 AM, nwebb <[EMAIL PROTECTED]> wrote:
> >
> > >   Hi,
> > >
> > > I'm drag/dropping items within a DataGrid. I would like to modify the
> > > default dragProxy label that is shown when you drag an item.
> > >
> > > (i.e. my DataGrid may have 4 columns, but I only want to show text
> > > from the last two columns).
> > >
> > > Does anyone know how to access it?
> > >
> > >
> > >
> >
> >
> > --
> > Douglas Knudsen
> > http://www.cubicleman.com
> > this is my signature, like it?
> >
>
>  
>

Reply via email to