我有一个Flex 4火花面板我雨后春笋般冒出来,通过PopUpManager中,但它在顶部我无法摆脱的灰色部分。那是什么,我该如何去除呢?
更新 的:一个例子面板如下。我只需拨打 PopUpManager.addPopUp(新パ(),背景,真实);
就可以了,并收到上面的按钮是灰色实吧
< S:面板的xmlns:S =库://ns.adobe.com/flex/spark
的xmlns:FX =http://ns.adobe.com/mxml/2009
dropShadowVisible =假
backgroundAlpha =为0
controlBarVisible =假
borderVisible =假>
&所述氏:VGroup>
< S:按钮标签=A键WIDTH =150HEIGHT =55/>
&所述; /秒:VGroup>
< / S:面板>
解决方案
所以,这就是我是如何做的。我做了一个自定义皮肤:HeaderlessPanelSkin.as
公共类HeaderlessPanelSkin扩展PanelSkin {
公共职能HeaderlessPanelSkin(){
超();
topGroup.includeInLayout = FALSE;
}
}
然后,在面板中,我只是引用新的皮肤:的skinClass =HeaderlessPanelSkin
这应该这样做:)
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?
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>
解决方案
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;
}
}
Then, in the panel, I just reference the new skin: skinClass="HeaderlessPanelSkin"
That should do it :)