I have 2 VBox containers inside a ViewStack and the viewstack is inside HBox, I ve set both the height and width of the vboxes to 100% and the same for the viewstack. My problem is that the viewstack does not display the whole content of the container childs only a part of it and displays a vertical scroll, although the width is stretched to fill the whole width of the container hbox, why doesn t the viewstack stretches to show the 100% height of its child and does it for the width only?
主应用程序包含一个HBox,其中包含一个模块加载器控件,该控件加载包含视图堆栈的模块。
主要申请:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalScrollPolicy="on"
xmlns:custom="components.*">
<custom:RepeatingImage source="images/up_bg.gif" width="100%" height="100%" repeatX="true" repeatY="false" />
<mx:Canvas width="100%">
<custom:header id="header" />
<mx:HBox id="content" horizontalGap="12" width="100%" x="12" y="180">
<mx:ModuleLoader id="contentModuleLoader" width="100%" />
<custom:sidead />
</mx:HBox>
</mx:Canvas>
<custom:footer id="footer" />
</mx:Application>
模块:
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:custom="components.*" width="100%">
<mx:LinkBar dataProvider="stack" />
<mx:ViewStack id="stack" width="100%">
<mx:VBox id="Content" label="First View" width="100%">
<mx:Canvas width="100%">
//controls here
</mx:Canvas>
<mx:Canvas width="100%">
<mx:HBox width="100%">
<mx:VBox width="100%">
//more controls and containers
</mx:VBox>
</mx:HBox>
</mx:Canvas>
</mx:VBox>
<mx:VBox label="Second View">
//controls
</mx:VBox>
</mx:ViewStack>
</mx:Module>