0 Replies Latest reply on Feb 7, 2008 7:55 AM by slane-soliant

    Trouble with GridRow expanding

    slane-soliant
      Hello all:

      I'm fairly new to Flex development, hope this question is not too obvious. I'm trying to create a Grid with rows and components that get larger as a user a resizes the window. I'm using constraint-based layout, and it seems to work fine till I get down to the GridRow level. My object hierarchy is Application->Canvas->Grid->GridRow. I can get the grid to be positioned absolutely within the Canvas, and to get wider as the window widens. But I can't get the GridRow to show the same behavior. I set the "right" property, but the row remains at a fixed width. Here's a code snippet:

      <mx:Grid horizontalGap="8" verticalGap="6" label="Questions" top="150" left="5" right="20" borderStyle="solid">

      <mx:GridRow top="35" right="10" paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5"
      borderStyle="solid" borderColor="#DDDDDD">
      <mx:GridItem>
      <mx:Text id="Category" text="{theList.currentItem.category}" paddingLeft="5"
      width="200" letterSpacing="1" fontFamily="Futura" fontWeight="bold" fontSize="12"
      color="#9C9BC1"/>
      </mx:GridItem>
      <mx:GridItem>
      <mx:Text id="Prompt" text="{theList.currentItem.prompt}" paddingLeft="5" width="200"/>
      </mx:GridItem>
      <mx:GridItem>
      <mx:ComboBox id="pb2" dataProvider="{theList.currentItem.answers.answer}" width="250"
      dropdownWidth="375"/>

      </mx:GridItem>
      <mx:GridItem>
      <mx:TextArea id="Notes" width="200" showScrollTips="true" height="70"/>
      </mx:GridItem>

      </mx:GridRow>

      The Grid as a whole resizes fine, but the GridRow will not -- it remains at a fixed width. Is this because I'm using absolute widths for components in the row?

      Thanks,

      Steve Lane