5 Replies Latest reply on May 4, 2009 11:04 AM by Flex harUI

    Module not sizing correctly


      I have an application with two modules that get loaded from the main application, and the modules are not sizing up to the full size of their container, but rather size to the size of the components in the module. I saw that other people had success using percentWidth="100" and percentHeight="100", but this does not work for me. Specifying any other size attribute, in the main application or the module seems to have no effect either! When the application loads, if sets the currentState to GuestSearch:


               <mx:State name="GuestSearch">
                   <mx:AddChild relativeTo="{leftSide}" position="lastChild">
                   <mx:AddChild relativeTo="{rightSide}" position="lastChild">



      Here is where the modules will be loaded:


          <mx:Canvas x="0" y="54" width="100%" height="100%" backgroundColor="#8591C2">
                  <mx:ConstraintColumn id="col1" width="300"/>
                  <mx:ConstraintColumn id="col2" width="100%" />
              <mx:Canvas id="leftSide" left="col1:7" top="9" bottom="9" right="col1:4"  backgroundColor="#ffffff"/>
              <mx:Canvas id="rightSide" left="col2:4" top="9" bottom="9" right="col2:7" backgroundColor="#ffffff"/>


      Here is a snippet from the GuestSearch module. Rather than filling in the entire area of the "rightSize" canvas, it comes it and sizes itself to the size of the textBox.


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:states="states.*" >

          <mx:VBox paddingLeft="5" borderStyle="solid" cornerRadius="4" backgroundColor="#FAF7E8">
              <mx:Text text="Find" styleName="text13Blue"/>




      Any help would be greatly appreciated!