4 Replies Latest reply on Jun 29, 2006 12:26 AM by FrodeHansen

    mx:text height bug?

    FrodeHansen
      I've used the mx:text tag to put in some text, and it seems that the amount of text forces the height of the application in a way that I get an vertical scroll bar. If I reduce the amount of text in the tag, the scrollbar dissapears. There is plenty of room below the text, so there should not be any need for this to happen.

      Have any of you experienced the same problem?
        • 1. Re: mx:text height bug?
          Level 7
          The "plenty of room" might be the default padding around the Application.
          Try adjusting the paddingBottom style on your Application (the default value
          is 24 pixels) to something smaller and see if that alleviates the problem.
          Otherwise, if you post some sample code showing the issue, I can help
          diagnose.

          Best,
          Deepa
          Flex SDK

          "Jobe007" <webforumsuser@macromedia.com> wrote in message
          news:e7uciv$k5q$1@forums.macromedia.com...
          > I've used the mx:text tag to put in some text, and it seems that the
          > amount of
          > text forces the height of the application in a way that I get an vertical
          > scroll bar. If I reduce the amount of text in the tag, the scrollbar
          > dissapears. There is plenty of room below the text, so there should not be
          > any
          > need for this to happen.
          >
          > Have any of you experienced the same problem?
          >


          • 2. mx:text height bug?
            FrodeHansen Level 1
            I don't think it is the padding that makes the error.

            Here I have cleaned up the code quite a bit, but it still has the same effect:

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application
            xmlns:mx=" http://www.adobe.com/2006/mxml">
            <mx:VBox width="100%" height="100%">
            <mx:ViewStack width="100%" id="Steps">
            <mx:VBox width="100%">
            <mx:HBox width="100%">
            <mx:Panel width="60%" layout="vertical">
            <mx:Text width="100%" fontSize="21" text="Curabitur viverra magna at lorem"/>
            <mx:Text width="100%">
            <mx:text>Curabitur viverra magna at lorem. Aliquam non ante et leo semper porta. Proin urna lorem, auctor vitae, molestie id, nonummy a, felis"Curabitur viverra magna at lorem. Aliquam non ante et leo semper porta. Proin urna lorem, auctor vitae, molestie id, nonummy a, felis"</mx:text>
            </mx:Text>
            <mx:Text width="100%">
            <mx:text>Curabitur viverra magna at lorem. Aliquam non ante et leo semper porta. Proin urna lorem, auctor vitae, molestie id, nonummy a, felis"</mx:text>
            </mx:Text>
            <mx:Text width="100%">
            <mx:text>Praesent ipsum orci, iaculis vitae, egestas sed, malesuada eu, sapien. Sed consectetuer erat vitae velit. Maecenas consequat orci vulputate lacus. Curabitur hendrerit pulvinar arcu. Vestibulum interdum semper ante. Maecenas eu quam. Fusce sed nunc a sapien"</mx:text>
            </mx:Text>
            </mx:Panel>
            </mx:HBox>
            </mx:VBox>
            </mx:ViewStack>
            </mx:VBox>
            </mx:Application>


            It seems to be related to the ViewStack tag. When I remove that, it turns out ok. Or it can of course be a no-brainer which I have missed. I'm pretty new to Flex.
            • 3. Re: mx:text height bug?
              Level 7
              Looks like thats a bug - the ViewStack container is not sizing its height
              correctly based on the height of its first visible child.

              As a workaround, set the height of the ViewStack. Either to a pixel size
              (ie: height="600") or a percentage (ie: height="100%").

              Also, make sure the Application is large enough (height-wise and width-wise)
              to contain the ViewStack or else you'll see scrollbars that the Application
              sprouts to view the entire ViewStack.

              -deepa

              "Jobe007" <webforumsuser@macromedia.com> wrote in message
              news:e7upvf$7he$1@forums.macromedia.com...
              > Here I have cleaned up the code quite a bit, but it still has the same
              > effect:
              >
              > <?xml version="1.0" encoding="utf-8"?>
              > <mx:Application
              > xmlns:mx=" http://www.adobe.com/2006/mxml">
              > <mx:VBox width="100%" height="100%">
              > <mx:ViewStack width="100%" id="Steps">
              > <mx:VBox width="100%">
              > <mx:HBox width="100%">
              > <mx:Panel width="60%" layout="vertical">
              > <mx:Text width="100%" fontSize="21" text="Curabitur viverra magna at
              > lorem"/>
              > <mx:Text width="100%">
              > <mx:text>Curabitur viverra magna at lorem. Aliquam non ante et leo
              > semper porta. Proin urna lorem, auctor vitae, molestie id, nonummy a,
              > felis"Curabitur viverra magna at lorem. Aliquam non ante et leo semper
              > porta.
              > Proin urna lorem, auctor vitae, molestie id, nonummy a, felis"</mx:text>
              > </mx:Text>
              > <mx:Text width="100%">
              > <mx:text>Curabitur viverra magna at lorem. Aliquam non ante et leo
              > semper porta. Proin urna lorem, auctor vitae, molestie id, nonummy a,
              > felis"</mx:text>
              > </mx:Text>
              > <mx:Text width="100%">
              > <mx:text>Praesent ipsum orci, iaculis vitae, egestas sed, malesuada
              > eu, sapien. Sed consectetuer erat vitae velit. Maecenas consequat orci
              > vulputate lacus. Curabitur hendrerit pulvinar arcu. Vestibulum interdum
              > semper
              > ante. Maecenas eu quam. Fusce sed nunc a sapien"</mx:text>
              > </mx:Text>
              > </mx:Panel>
              > </mx:HBox>
              > </mx:VBox>
              > </mx:ViewStack>
              > </mx:VBox>
              > </mx:Application>
              >
              >
              > It seems to be related to the ViewStack tag. When I remove that, it turns
              > out
              > ok.
              >


              • 4. Re: mx:text height bug?
                FrodeHansen Level 1
                I installed the Flex 2 final release, and the problem is gone :)