Flex 中设置模块宽度和高度的问题
我正在 Flex 应用程序中使用模块。我试图将宽度和高度设置为 100%,以便模块采用其父容器的宽度和高度,但这似乎不起作用。
有人之前遇到过这个问题吗?模块宽度设置为某些默认大小,并且还会出现滚动条。 我在下面给出我的代码
<s:BorderContainer width="100%" height="100%" id="T1">
<s:BorderContainer visible="false"
visible.QuestionContainer="true"
width="100%"
height="100%"
id="qContainer"
borderVisible="false">
<mx:ModuleLoader id="mod" url="M1.swf" width="200%" />
</s:BorderContainer>
<mx:ProgressBar includeIn="Loading" x="283" y="176" labelPlacement="center" indeterminate="true" label="LOADING MODULE"/>
<s:Label includeIn="CloseState" text="You may close the window now" horizontalCenter="0" verticalCenter="0" color="#257E2D" fontWeight="bold" fontSize="20"/>
<mx:ProgressBar includeIn="Processing" horizontalCenter="0" verticalCenter="0" indeterminate="true" label="processing information" labelPlacement="center"/>
</s:BorderContainer>
请告知。
谢谢阿帕娜
I am using modules within a Flex Application. I am trying to set the width and height to 100% so that the module takes the width and height of its parent container , however this does not seem to work.
Has anyone faced this issue earlier? The module width is setting to some default size and scroll bars are also appearing.
I am giving my code below
<s:BorderContainer width="100%" height="100%" id="T1">
<s:BorderContainer visible="false"
visible.QuestionContainer="true"
width="100%"
height="100%"
id="qContainer"
borderVisible="false">
<mx:ModuleLoader id="mod" url="M1.swf" width="200%" />
</s:BorderContainer>
<mx:ProgressBar includeIn="Loading" x="283" y="176" labelPlacement="center" indeterminate="true" label="LOADING MODULE"/>
<s:Label includeIn="CloseState" text="You may close the window now" horizontalCenter="0" verticalCenter="0" color="#257E2D" fontWeight="bold" fontSize="20"/>
<mx:ProgressBar includeIn="Processing" horizontalCenter="0" verticalCenter="0" indeterminate="true" label="processing information" labelPlacement="center"/>
</s:BorderContainer>
Please advise.
Thanks
Aparna
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定为什么你会发生这种情况,但要解决这个问题,你可以尝试使用数据绑定来渲染子容器。例如,
这应该可以工作,直到调整大小。如果你也想在调整大小时处理事情,你可以添加调整大小处理程序并重新计算宽度/高度。
I am not sure why this is happening with you, but to resolve this you can try using data binding to render children containers.e.g
This should work until things are resized.If you want to handle things on resize too, you can add a resize handler and recompute the width/height.