我有一个类似下面的代码:
<s:VGroup>
<s:HGroup verticalAlign="middle">
<s:Label text="label" />
<s:TextInput id="rmName"/>
</s:HGroup>
<mx:HorizontalList id="imagePreview" width="100%" visible="false"
columnWidth="100" rowCount="1" rowHeight="130" selectable="false" borderVisible="false">
<mx:itemRenderer>
...
</mx:itemRenderer>
</mx:HorizontalList>
<s:VGroup>我希望s:VGroup容器只具有其可视子容器的高度。在这个示例中,即使可见性mx:HorizontalList被设置为false,也有一个空闲空间。每次我更改子元素的可见性时,我希望父元素(s:VGroup)会改变他的高度。如何在flex中做到这一点?
发布于 2010-11-13 03:51:46
当您将visible属性从true更改为false时,还要将includeInLayout属性从true更改为false。
https://stackoverflow.com/questions/4168246
复制相似问题