The Flex 4 Intrinsic Safety Panel has an ugly gray top

I have a Flex 4 intrinsic safety panel that pops up through PopUpManager, but it has a gray part at the top that I can't get rid of. What is it and how to remove it?

UPDATE Below is an example panel. I will just call PopUpManager.addPopUp(new TestPanel(), background, true); on it and get that solid gray stripe 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> 
+4
source share
3 answers

So here is how I did it. I created a custom skin: HeaderlessPanelSkin.as

 public class HeaderlessPanelSkin extends PanelSkin { public function HeaderlessPanelSkin() { super(); topGroup.includeInLayout = false; } } 

Then, in the panel, I simply refer to the new skin: skinClass="HeaderlessPanelSkin"

That should do it :)

+12
source

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

File-> New MXML skin, node component is a panel.

Change the Skin properties to change it as you like, in this case the gradient colors in the header.

+3
source

Sounds like a TitleBar

Create a custom skin and write down the title bar as you want it to appear.

+1
source

Source: https://habr.com/ru/post/895331/


All Articles