Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex 4 spark Panel has an ugly gray top part

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>
like image 577
at. Avatar asked Dec 06 '22 00:12

at.


1 Answers

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 :)

like image 96
Brian Genisio Avatar answered Dec 31 '22 07:12

Brian Genisio