I tried the drag and drop with List and itemrenderer, but drag and
drop does not seems to work if I am using the control inside a popup
window.


--- In flexcoders@yahoogroups.com, "deepu_verma" <[EMAIL PROTECTED]> wrote:
>
> The following code does not work for me to allow the Combobox to be
> dragged and dropped inside the repeater control
> Is this the right approach, any help is appreciated.
> 
> Thanks,
> Deepak 
> 
> <mx:Repeater id="productRepeater" recycleChildren="false" >
>       <mx:HBox        height="50"  
>                       
> mouseMove="webPageUpdateViewHelper.dragIt(event,null,'data');"
>                       dragEnter="webPageUpdateViewHelper.doDragEnter(event);" 
>                       dragDrop="webPageUpdateViewHelper.doDragDrop(event);"   
>         
>                       borderStyle="solid">
>               <mx:ComboBox id="relatedProduct"                                
>                         
>
dataProvider="{webPageUpdateViewHelper.modelLocator.productVersionModel.productVersionCollection}"
> 
>                               
>
selectedIndex="{webPageUpdateViewHelper.relatedProductSelectedIndex(productRepeater.currentItem.id)}"
> labelFunction="webPageUpdateViewHelper.productVersion_label" 
>                                                                        />
>                                                               
>               </mx:HBox>
> </mx:Repeater>
> 
> 
> 
> 
> public function dragIt(event:MouseEvent, obj:Object,
format:String):void {
> 
>             // Get the drag initiator component from the event object.
>             var dragInitiator:HBox=HBox(event.currentTarget);
>             // Create a DragSource object.
>             var ds:DragSource = new DragSource();
>             // Add the data to the object.
>             ds.addData(obj,format);
>          
>             DragManager.doDrag(dragInitiator, ds, event);
>         }
> 
>               // Called if the user dragged a proxy onto the drop target 
> canvas.
>         public function doDragEnter(event:DragEvent):void {
>             // Get the drop target component from the event object.
>             var dropTarget:HBox=HBox(event.currentTarget);
> 
>             DragManager.acceptDragDrop(dropTarget);
> 
>         }
>          public function doDragDrop(event:DragEvent):void {
>             // Get the data identified by the color format from the
> drag source.
>             var data:Object = event.dragSource.dataForFormat('data');
>             // Set the canvas color.
>             
>         }
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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/
 


Reply via email to