手风琴内部的平铺无法正确调整大小
在我正在构建的 Flex 应用程序中,我有一个带有 Tile 组件的 Accordion,如下所示:
<mx:Accordion id="accordionShoppingBasket" width="100%" resizeToContent="true">
<mx:VBox width="100%" height="100%" >
<mx:Tile id="tileOutNow" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20" verticalScrollPolicy="off" />
</mx:VBox>
<mx:VBox width="100%" height="100%">
<mx:Tile id="tileThisWeek" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20"/>
</mx:VBox>
<mx:VBox width="100%" height="100%">
<mx:Tile id="tileFutureRelease" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20"/>
</mx:VBox>
</mx:Accordion>
我添加到 Tile 的项目是一个画布,其中包含图像。
通过 addChild 方法添加图块的数据;这适用于前 4 行子项,手风琴控件会调整大小以适应平铺控件。在前 4 行之后,仍在添加子项,但手风琴不再调整大小以适应内容。
我不是 100% 确定是什么原因造成的,有什么想法吗?
干杯 托尼
In a Flex application I'm building I have an Accordion with a Tile component as shown:
<mx:Accordion id="accordionShoppingBasket" width="100%" resizeToContent="true">
<mx:VBox width="100%" height="100%" >
<mx:Tile id="tileOutNow" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20" verticalScrollPolicy="off" />
</mx:VBox>
<mx:VBox width="100%" height="100%">
<mx:Tile id="tileThisWeek" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20"/>
</mx:VBox>
<mx:VBox width="100%" height="100%">
<mx:Tile id="tileFutureRelease" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20"/>
</mx:VBox>
</mx:Accordion>
The items I'm adding to the tiles are a canvas with an image inside that.
The data for the tile is added via the addChild method; and this works for the first 4 rows of children, the accordion control resizes to accommodate the tile control. After the first 4 rows the children are still being added but the accordion no longer resizes to fit the content.
I'm not 100% sure what's causing this, any ideas?
Cheers
Tony
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,您希望 Accordion 调整其内容大小,但是,您将内容大小设置为 100% ...它看起来像一个无限循环...
尝试删除 resizeToContent 或为子 Tile 设置正确的大小。 ..
Hmm, you want the Accordion resize to its content, BUT, you set the content size to 100% ... its look like an endless loop ...
Try removing the resizeToContent OR set a correct size for the children Tile(s) ...
嗯,手风琴的父母长什么样?意思是,他们的高度会限制手风琴的高度吗?
否则,可能需要发布更多代码。
Hmm, what do the parent(s) of the accordion look like? Meaning, could their height be restricting the height of the accordion?
Otherwise, posting more code might be necessary.