Sorted... I need the property clipAndEnableScrolling="true" for the main panel to be set.
<s:Panel id="MainPanel"> <s:layout> <s:VerticalLayout clipAndEnableScrolling="true"> </s:layout> </s:Panel> --- In flexcoders@yahoogroups.com, "bhaq1972" <mbha...@...> wrote: > > I am setting the width of a Spark Panel to zero but I can still see it. > Halo Panel does not have this problem. > > Any ideas? > > Thanks in Advance. > > Here's a simple example > > <?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"> > > <s:layout> > <s:VerticalLayout horizontalAlign="center" paddingTop="20" > paddingLeft="5" paddingRight="5"/> > </s:layout> > > <fx:Script> > <![CDATA[ > > public function changeWidth():void > { > // change menu Panel width > var width1:int = 0.25 * MainPanel.width; > panelMenu.width = (panelMenu.width == 0) ? width1 : 0; > } > ]]> > </fx:Script> > > <s:Button label="click" click="changeWidth()"/> > <s:Panel id="MainPanel" title="panel" width="100%" height="100%"> > <mx:HDividedBox width="100%" height="100%" horizontalScrollPolicy="off"> > <mx:ViewStack id="vsContainer" width="75%" height="100%"/> > <s:Panel id="panelMenu" title="Topics" width="25%" height="100%"> > <s:Label text="halo Panel ok. spark has an issue"/> > </s:Panel> > </mx:HDividedBox> > </s:Panel> > </s:Application> > > ------------- > Same test using Halo Panel > <?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"> > > <s:layout> > <s:VerticalLayout horizontalAlign="center" paddingTop="20" > paddingLeft="5" paddingRight="5"/> > </s:layout> > > <fx:Script> > <![CDATA[ > > public function changeWidth():void > { > // change menu Panel width > var width1:int = 0.25 * MainPanel.width; > panelMenu.width = (panelMenu.width == 0) ? width1 : 0; > } > ]]> > </fx:Script> > > <s:Button label="click" click="changeWidth()"/> > <s:Panel id="MainPanel" title="panel" width="100%" height="100%"> > <mx:HDividedBox width="100%" height="100%" horizontalScrollPolicy="off"> > <mx:ViewStack id="vsContainer" width="75%" height="100%"/> > <mx:Panel id="panelMenu" title="Topics" width="25%" height="100%"> > <s:Label text="halo Panel ok. spark has an issue"/> > </mx:Panel> > </mx:HDividedBox> > </s:Panel> > </s:Application> >