3 Replies Latest reply on Jun 28, 2009 12:42 AM by *Prashant Shelke*

    mx:Text wrap ?


      <mx:Text width="100%" height="50" >


      this way if there is a long text it is wrapped, but when the height of the wrapped text is more than 50 some rows of the text are not visible. How do I make the mx:Text to be automatically resized to fit the text?

        • 1. Re: mx:Text wrap ?
          Vanden_B Level 1

          The Text control does not support scroll bars. If you need scrolling, you  should use a non-editable TextArea control.


          To size a Text component, it's common to specify an explicit width and let  Flex determine the height as required to display all the text. If you specify an  explicit height, some of the text may get clipped; unlike Label, Text does not  truncate its text with "...". It's also common to use percentage widths and  heights with Text.

          • 2. Re: mx:Text wrap ?
            vachik79 Level 1

            I use the mx:Text in an itemRenderer and if no heigth is specified it is not visible in the advanceddataGrid . Please see the attached image. The goal is to resize the row of the table automatically based on the text size.

            • 3. Re: mx:Text wrap ?
              *Prashant Shelke* Level 4

              you can set variableRowHeight attribute to dataGrid & specify height="100%" for Text control.