4 Replies Latest reply on Oct 1, 2009 11:29 AM by Jerry62712

    Flex and vertical spacing

    Jerry62712 Level 1

      When I increase the font size by loading a different css page, the text increases as expected and the horizontal container expands, but that container doesn't expand vertically.  The results are the bottom of the line is cut off.  How do I get Flex to properly size the container in both dimensions?

       

      I don't want to have to manually go in via the program and resize every container if I can avoid it.

        • 2. Re: Flex and vertical spacing
          ShardulSingh Level 3

          Hi,

          I dont know which container you are using for the same.But I will suggest that dont provide the height and

          width to that container.It will work fine.

          You can see in this sample application, the red container which is a HBox take the same size as the label.

          You can give any fontsize it will adjust itself accordigly.

          Below is the code for the samle application.

           

           

          <?xml version="1.0" encoding="utf-8"?>

          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

                <mx:HBox backgroundColor="0xFF0000">

                      <mx:Label text="Hi" fontSize="58"/>

                </mx:HBox>

          </mx:Application>

           

           

           

           

          with Regards,

           

          Shardul Singh Bartwal

           

           

           

          • 3. Re: Flex and vertical spacing
            Jerry62712 Level 1

            Here are the surrounding containers:


                                <mx:HBox id="resultResidenceSizeBox"
                                    y="20"
                                    width="100%"
                                    height="100%">
                                    <mx:Label id="resultResidenceSizeLabel"
                                        text=" "
                                        width="85%"
                                        toolTip=" "
                                        height="100%"
                                        tabIndex="210" />
                                    <mx:Text id="resultResidenceSizeData"
                                        textAlign="right"
                                        width="15%"
                                        height="100%"
                                        tabIndex="213" />
                                </mx:HBox>

             

            I make the width 85% so I will be able to always see the data protion.  That id no

            • 4. Re: Flex and vertical spacing
              Jerry62712 Level 1

              Sorry about that last sentence.  I was rather distracted.

               

              I made the width 85% and the data width 15% so a longer text would not take the data horizontal space disappear.  It does anyway.