将项目渲染器(面板)拖放到列表中 [英] Drag and drop item renderer(panel) within list

查看:184
本文介绍了将项目渲染器(面板)拖放到列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Spark列表,其项目渲染器是一个面板,在面板中有一些组件,如Textinput,现在我想拖放一个面板内的列表,我该怎么做,请问告诉我的代码,谢谢。

I have a spark List,its item renderer is a panel,and in the panel there are some components such as Textinput,now I want to drag and drop a panel within the List,how can I do that,could you pls show me the code,thanks.

推荐答案

感谢您的help.Now我赶上一个错误,而draging的itemRenderer(我的Flex SDK是4.5.1)。
我的清单itemRenderer:

thanks for your help.Now I catch an error while draging the itemRenderer(my flex sdk is 4.5.1). My list itemRenderer:

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
            xmlns:s="library://ns.adobe.com/flex/spark" 
            xmlns:mx="library://ns.adobe.com/flex/mx" 
            width="100%" height="100%">
    <fx:Script>
    <![CDATA[
        import mx.events.CloseEvent;


        override public function set data(value:Object ) : void{
            super.data = value;
        }

        protected function closeHandler(event:CloseEvent):void
        {
            //ToDo
        }

    ]]>
</fx:Script>
    <s:TitleWindow x="0" y="0" title="{data.label}"
               width="100%" height="100%" creationPolicy="all"
               skinClass="skin.titleWindowSkin" 
               close="closeHandler(event)">
    <s:Label text="{data.value}"/>

    <s:TextInput x="123" y="58" text="@{data.value}" 
                 focusIn="parentDocument.owner.dragEnabled=false" 
                 focusOut="parentDocument.owner.dragEnabled=true"/>

</s:TitleWindow>
</s:ItemRenderer>



虽然draging,捕获错误等:
错误:DragProxy261.ListItemDragProxy260.DspDesktopItemRenderer262皮肤._DspDesktopItemRenderer_TitleWindow1.titleWindowSkin264.Group265.contents._titleWindowSkin_Group5.contentGroup._DspDesktopItemRenderer_TextInput1无法找到。在spark.components.supportClasses
:: SkinnableComponent / attachSkin()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\\ \\SkinnableComponent.as:698]

While draging,catch an error like: Error: Skin for DragProxy261.ListItemDragProxy260.DspDesktopItemRenderer262._DspDesktopItemRenderer_TitleWindow1.titleWindowSkin264.Group265.contents._titleWindowSkin_Group5.contentGroup._DspDesktopItemRenderer_TextInput1 cannot be found. at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]

这篇关于将项目渲染器(面板)拖放到列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆