0
votes

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

1

1 Answers

0
votes

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

<s:BorderContainer visible="false"
                           visible.QuestionContainer="true"
                           width="{T1.width}"
                           height="{T1.height}"
                           id="qContainer"
                           borderVisible="false">
            <mx:ModuleLoader id="mod" url="M1.swf" width="{qContainer.width}"   />
        </s:BorderContainer>

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.