Apache flex 强制子组件将其自身大小调整为大于其容器大小
我正在创建一个组件,它可以显示不同数量的内容,如您所愿,其布局如下:Apache flex 强制子组件将其自身大小调整为大于其容器大小,apache-flex,layout,components,containers,Apache Flex,Layout,Components,Containers,我正在创建一个组件,它可以显示不同数量的内容,如您所愿,其布局如下: <HDividedBox id="container"> <VBox id="myComponent"> <HBox id="header"> ...header content... </HBox> <Tile id="body"> ...gauges are added to the body..
<HDividedBox id="container">
<VBox id="myComponent">
<HBox id="header">
...header content...
</HBox>
<Tile id="body">
...gauges are added to the body...
</Tile>
</Vbox>
</HDividedBox>
主体平铺具有水平方向。当我拖动HDividedBox使myComponent变小时,主体组件也会变小,最终如果有太多的仪表无法水平安装,它们将被碰撞到下一行,因此我使myComponent变小,垂直堆叠的仪表数量会增加
这一切都很好。问题是,无论我使用哪种设置组合,我绝对无法使主体一个平铺的大小超过myComponent的大小,这在理想情况下会导致myComponent垂直滚动。即使将主体的maxHeight设置为某个巨大的值,它也永远不会将自身大小设置为大于其容器的大小
关于如何实现这一点有什么想法吗
谢谢如果强制调整VBox或HDividedBox的高度,然后设置平铺scoll策略并继续向其中添加组件,最终将看到一个滚动条
<mx:HDividedBox x="400" y="300" width="200" height="150">
<mx:VBox width="100%" height="100%" >
<mx:HBox width="100%" height="100%">
<mx:Button label="Header"/>
<mx:Button label="Header"/>
</mx:HBox>
<mx:Tile verticalScrollPolicy="on" width="100%">
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
<mx:Button label="Gauge"/>
</mx:Tile>
</mx:VBox>
</mx:HDividedBox>