flex 简单翻转问题

发布于 2024-11-26 08:30:30 字数 218 浏览 1 评论 0原文

我在 panel1 里面有一个 panel2。 当我翻转 panel1 时,我希望 panel2 可见,而当 mouseOut 时,panel2 不可见。 这对于 mouseOcer 和 MouseOut 事件来说很简单

当然,问题是当我翻转 panel2 (在 panel1 内)时:它开始闪烁。 我的问题是:如何简单地纠正它? (当然我希望 panel2 内的按钮也处于活动状态)

问候

I have a panel2 inside panel1.
When I rollover panel1, I want panel2 to be visible and when mouseOut, panel2 to be invisible.
This is simple with mouseOcer and MouseOut events

Of course trouble is when I rollover panel2 (inside panel1): it starts blinking.
My question is: how to simply correct it ? (of course I would like buttons inside panel2 to be active as well)

regards

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

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

发布评论

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

评论(1

安人多梦 2024-12-03 08:30:30

为什么这个代码对你不起作用?

<?xml version="1.0" encoding="utf-8"?>
<s:Application minHeight="600" minWidth="955" xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Script>
    <![CDATA[
        [Bindable]
        private var isOver:Boolean;
    ]]>
    </fx:Script>
    <s:Panel horizontalCenter="0" id="panel1" mouseOut="isOver = false" mouseOver="isOver = true" title="Panel1"
        verticalCenter="0">
        <s:Panel bottom="10" id="panel2" left="10" right="10" title="Panel2" top="10" visible="{isOver}">
            <s:layout>
                <s:VerticalLayout horizontalAlign="center" paddingBottom="10" paddingLeft="10" paddingRight="10"
                    paddingTop="10" verticalAlign="middle" />
            </s:layout>
            <s:Label id="actionResult" />
            <s:HGroup>
                <s:Button click="actionResult.text = 'Button 1 clicked'" label="Button1" />
                <s:Button click="actionResult.text = 'Button 2 clicked'" label="Button2" />
            </s:HGroup>
        </s:Panel>
    </s:Panel>
</s:Application>

Why this code won't work for you?

<?xml version="1.0" encoding="utf-8"?>
<s:Application minHeight="600" minWidth="955" xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Script>
    <![CDATA[
        [Bindable]
        private var isOver:Boolean;
    ]]>
    </fx:Script>
    <s:Panel horizontalCenter="0" id="panel1" mouseOut="isOver = false" mouseOver="isOver = true" title="Panel1"
        verticalCenter="0">
        <s:Panel bottom="10" id="panel2" left="10" right="10" title="Panel2" top="10" visible="{isOver}">
            <s:layout>
                <s:VerticalLayout horizontalAlign="center" paddingBottom="10" paddingLeft="10" paddingRight="10"
                    paddingTop="10" verticalAlign="middle" />
            </s:layout>
            <s:Label id="actionResult" />
            <s:HGroup>
                <s:Button click="actionResult.text = 'Button 1 clicked'" label="Button1" />
                <s:Button click="actionResult.text = 'Button 2 clicked'" label="Button2" />
            </s:HGroup>
        </s:Panel>
    </s:Panel>
</s:Application>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文