在 Flex 中使用 vgroup 作为放置目标

发布于 2024-10-06 02:43:32 字数 102 浏览 0 评论 0原文

是否可以使用 VGroup 作为 Flex 中的放置目标?我喜欢 vgroup 的功能(轻松添加元素等),但我还没有找到一种方法让它在有东西掉落在其上时进行注册。

这可能吗?

Is it possible to use a VGroup as a drop target in flex? I like the functionality of a vgroup (adding elements easily, etc) but I haven't found a way to get it to register when things are dropped on it.

Is this possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鲜肉鲜肉永远不皱 2024-10-13 02:43:32

我的例子的解决方案是将整个东西包围在一个 VBox 中,它支持 DragEnter 和 DragDrop,这使得配置更容易。

    <s:Group top="30" width="100%" height="100%">
        <mx:VBox id="dropTargetVBox" label="if" 
                width="100%" height="100%"
                borderStyle="none" dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)">
            <s:Scroller width="100%" height="100%">
                <s:VGroup id="lst" gap="0" height="100%" width="100%">
                </s:VGroup>
            </s:Scroller>
        </mx:VBox>
    </s:Group>

除此之外,还允许我将其他东西放入其中(这对于我想要做的事情来说是可取的)。

The solution in my case was to surround the whole thing in a VBox, which does support dragEnter and dragDrop, which makes configuration easier.

    <s:Group top="30" width="100%" height="100%">
        <mx:VBox id="dropTargetVBox" label="if" 
                width="100%" height="100%"
                borderStyle="none" dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)">
            <s:Scroller width="100%" height="100%">
                <s:VGroup id="lst" gap="0" height="100%" width="100%">
                </s:VGroup>
            </s:Scroller>
        </mx:VBox>
    </s:Group>

And on top of this, also allows me to put other things inside (which is desirable for what I'm trying to do).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文