8 Replies Latest reply on Jan 25, 2011 11:12 AM by One_Life

    Layout question - shouldn't this get clipped instead of "run-over"

    One_Life Level 1

      Hi,

       

      Can you tell me in the following simple layout test, is Flex making an error here, i.e.:

       

         - why doesn't the Panel span the entire HGroup?

       

         - shouldn't label 3 get cut-off instead of going beyond the HGroup, which is set to a 250 pixel width?

       

      Thanks

      -------------------------------------

      <?xml version="1.0"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"  >
       
        <s:Panel backgroundColor="red" title="THIS IS THE PANEL">
          <s:layout>
            <s:HorizontalLayout />
          </s:layout>
         
          <s:HGroup width="250" gap="5">
            <s:Label backgroundColor="blue" text="Label 1"  width="100" />
            <s:Label id="lab2" backgroundColor="green" text="Label 2"  width="100" />
            <s:Label id="lab3" backgroundColor="yellow"
              text="Label 3 is longer with no width specified" />
          </s:HGroup>
        </s:Panel>
      </s:Application>