Not that this helps but I have seen the same thing dragging a datagrid item to the tree..... duplicated with the following simple code.  Maybe it will help with trying to find an answer.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:my="*" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="400" verticalScrollPolicy="auto">
    <mx:Script>
        <![CDATA[
            import mx.events.DragEvent;
            import mx.managers.DragManager;
            import mx.core.DragSource;
            import mx.core.IUIComponent ;
            import mx.core.Container;
            import mx.controls.Tree;
           
            private function startdgDrag(event:MouseEvent):void {
                if(event.buttonDown) {
                    var ds:DragSource = new DragSource();
                    ds.addData(event.currentTarget.selectedItem,"treeItems");
                    DragManager.doDrag(IUIComponent(event.currentTarget),ds,event);
                }
               
            }
           

        ]]>
    </mx:Script>
           
            <mx:XML xmlns="" id="testdp">
                <root label="Documents">
                    <folder label="test" isBranch="true" />
                    <folder label="test2" isBranch="true" />
                </root>
            </mx:XML>
       

    <mx:DataGrid id="testdg" width="400" height="300" x="0" y="200" dragEnabled="true" mouseMove="startdgDrag(event)">
        <mx:columns>
            <mx:DataGridColumn dataField="blah" headerText="blah" />
        </mx:columns>
        <mx:dataProvider>
            <mx:Array>
                <mx:Object blah="blah" test="test" />
            </mx:Array>           
        </mx:dataProvider>
    </mx:DataGrid>
    <my:customTree id="testtree" width="400" x="450" y="200" height="300" dropEnabled="true" labelField="@label" dataProvider="{testdp}">
    </my:customTree>
</mx:Application>


Scotty
http://www.franciswscott.com



On 7/24/06, mmmmbeeeeer <[EMAIL PROTECTED]> wrote:

I suspect that my post at 5.30am wasn't noticed. If anyone can offer
any insight into this problem I would appreciate it.

Thanks,

Pete

--- In [email protected], "mmmmbeeeeer" < [EMAIL PROTECTED]>


wrote:
>
> Here's an interesting problem which I hope someone can help me with.
>
> I've just started playing with Flex 2 - release version and have
> implemented the following:
>
> 1. Composite component containing a label and DataGrid in a Vbox
>
> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:vz="*"
> width="100%">
>
> <mx:Script>
> <![CDATA[
> import mx.collections.ArrayCollection;
>
> [Bindable]
> public var compTitle:String;
>
> [Bindable]
> public var compDataProvider:ArrayCollection;
> ]]>
> </mx:Script>
>
> <mx:Label text="{compTitle}" width="100%" fontSize="18"
> fontWeight="bold" fontFamily="Arial"/>
>
> <mx:DataGrid id="grid" dataProvider="{compDataProvider}" width="100%"
> alternatingItemColors="[#CBDDFE,#FFFFFF]" showHeaders="false"
> dragEnabled="true" dropEnabled="true" dragMoveEnabled="true">
> <mx:columns>
> <mx:DataGridColumn headerText="Client" dataField="CUSTOMER"/>
> <mx:DataGridColumn headerText="Name" dataField="NAME"/>
> ... etc
> </mx:columns>
> </mx:DataGrid>
> </mx:VBox>
>
>
> 2. I have actionscript code in my application file which gets a list of
> categories from server side and iterates over that list requesting a
> list of objects (Jobs in this case) for each category from the server
> side. It then creates one of the above components for each category,
> adds it to the container (a Vbox) in the Application and gives it the
> dataProvider containing the relevant info.
>
> So far so good - this works fine...
>
> Now, when I drag a row from the DataGrid in one component to the
> DataGrid in another, it works fine when the browser is at the top of the
> page, however if I scroll the browser window down (the Flash Player
> canvas is bigger than the screen) the dropping gets screwed up. To be
> more precise, it appears as though the drop target is getting the
> dragEnter event when the mouse is not actually in the right place. As I
> scroll the browser window down, the apparent location of the drop target
> (as seen by the code sending the dragEnter event) is offset to the north
> of the visible drop Target component. The further down the browser
> window is scrolled, the more the offset until it just doesn't work at
> all.
>
> I've tested in both IE6 and Firefox 1.5.0.4 with the same results.
>
> I'm wondering whether anyone else has seen this behaviour - a search of
> the archives didn't seem to reveal any prior reports.
>
> Thanks for any help you might be able to offer.
>
> Cheers,
>
> P
>


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to