Unlike VBox, Spark Group Container shows child components even height=0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unlike VBox, Spark Group Container shows child components even height=0

ilikeflex
Hi

Child components are displayed when height=0 for spark group container.So how can we hide the components in the Group.

This is used to work perfectly fine with VBox.

If you notice below the children of VBox are not displayed.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
        <fx:Declarations>
                <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
       
        <s:Group width="100%" height="0">
                <s:Button label="Hi - group container"/>
        </s:Group>
       
        <mx:VBox height="0" width="100%">
                <s:Button label="Hi - mx VBOx container"/>
        </mx:VBox>
       
</s:Application>

So i want to hide the components in the group.
Any pointer..

Thanks
Rajan

Reply | Threaded
Open this post in threaded view
|

Re: Unlike VBox, Spark Group Container shows child components even height=0

Alex Harui
With Spark, you have to use a Scroller, or add custom code to set a scrollRect.  But if you are using height=0 to hide something, you might be better off using visible and includeInLayout.

From: ilikeflex <[hidden email]<mailto:[hidden email]>>
Reply-To: "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>>
Date: Thursday, May 16, 2013 3:22 PM
To: "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>>
Subject: [flexcoders] Unlike VBox, Spark Group Container shows child components even height=0



Hi

Child components are displayed when height=0 for spark group container.So how can we hide the components in the Group.

This is used to work perfectly fine with VBox.

If you notice below the children of VBox are not displayed.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<s:Group width="100%" height="0">
<s:Button label="Hi - group container"/>
</s:Group>

<mx:VBox height="0" width="100%">
<s:Button label="Hi - mx VBOx container"/>
</mx:VBox>

</s:Application>

So i want to hide the components in the group.
Any pointer..

Thanks
Rajan