at.
at.

Reputation: 52550

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>

Upvotes: 4

Views: 5031

Answers (3)

Brian Genisio
Brian Genisio

Reputation: 48147

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

Upvotes: 12

ocodo
ocodo

Reputation: 30269

Sounds like the Panel TitleBar

Create a custom skin and style the title bar how you want it to appear.

Upvotes: 1

JTtheGeek
JTtheGeek

Reputation: 1713

Create new skin, and in the panel declaration use it... like so

File->New MXML Skin, Host Component is panel.

Edit the Skin properties to change it how you like, in this case the gradient colors on the header.

Upvotes: 3

Related Questions