Flex 4 spark Panel 顶部有一个难看的灰色 [英] Flex 4 spark Panel has an ugly gray top part

查看:23
本文介绍了Flex 4 spark Panel 顶部有一个难看的灰色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过 PopUpManager 弹出的 Flex 4 spark 面板,但它的顶部有一个灰色部分,我无法摆脱.那是什么,我该如何删除它?

I have a Flex 4 spark Panel I'm popping up through the PopUpManager, but it has a gray portion at the top I can't get rid of. What is that and how can I remove it?

更新:下面是一个示例面板.我只需调用 PopUpManager.addPopUp(new TestPanel(), background, true); 并在按钮上方接收灰色实心条.

UPDATE: An example Panel is below. I simply call PopUpManager.addPopUp(new TestPanel(), background, true); on it and receive that solid gray bar above the button.

<s:Panel xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:fx="http://ns.adobe.com/mxml/2009"
         dropShadowVisible="false"
         backgroundAlpha="0"
         controlBarVisible="false"
         borderVisible="false">
    <s:VGroup>
        <s:Button label="A button" width="150" height="55"/>
    </s:VGroup>
</s:Panel>

推荐答案

所以,我就是这样做的.我做了一个自定义皮肤:HeaderlessPanelSkin.as

So, this is how I did it. I made a custom skin: HeaderlessPanelSkin.as

public class HeaderlessPanelSkin extends PanelSkin {
   public function HeaderlessPanelSkin() {
        super();

        topGroup.includeInLayout = false;
    }
}

然后,在面板中,我只引用新皮肤:skinClass="HeaderlessPanelSkin"

Then, in the panel, I just reference the new skin: skinClass="HeaderlessPanelSkin"

应该这样做:)

这篇关于Flex 4 spark Panel 顶部有一个难看的灰色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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