0 Replies Latest reply on Mar 9, 2011 3:30 PM by kkras

    Setting horizontal position on mx:GridItem

    kkras

      working through some tutorial code, I'm working with a grid layout like this:

       

          <mx:Grid>
              <mx:GridRow>
                  <mx:GridItem>
                      <s:Button label="Rewind"/>
                  </mx:GridItem>
                  <mx:GridItem>
                      <s:Button label="Play"/>
                  </mx:GridItem>
                  <mx:GridItem>
                      <s:Button label="Forward"/>
                  </mx:GridItem>
              </mx:GridRow>
              <mx:GridRow >
                  <mx:GridItem colSpan="3">
                      <s:Button label="STOP" width="100%"/>
                  </mx:GridItem>
              </mx:GridRow>
          </mx:Grid>

       

      Easy enough. However, in design mode I wanted to resize the STOP button (smaller) in the gridItem row and center it. I must be missing something. While I can do this:

       

              <mx:GridRow >
                  <mx:GridItem colSpan="3" horizontalAlign="center">
                      <s:Button label="STOP" width="50%"/>
                  </mx:GridItem>
              </mx:GridRow>

       

      Through the source editor, I don't see an equivalent feature through the design view that allows me to set the horizontal alignment property (or at least anything that works). There's vertical, top and bottom, but no horizontal? The only horizontal formatting is in context of the text alignment.

      Am I missing something?