I\'m creating an Adobe Flex application and I have a Text control (mx:Text), which is supposedly used when you need multiline noneditable text (as opposed to a Label, which
I could do it using only mxml. The result is quite ugly, but I could do it.
<s:Group id="propDisplay" width="100%">
<mx:Text id="key" left="0" text="{data.key}:"/>
<mx:Text left="{key.width}" maxWidth="{propDisplay.width - key.width}"
text="{data.value}" />
</s:Group>
So Christian's example of just an Application with a Text element inside work, but it is far too easy to screw up the layout. Just add one VBox inbetween and wrapping does not work:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%">
<mx:VBox width="100%">
<mx:Text width="100%" height="100%" text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." />
</mx:VBox>
</mx:Application>
render="invalidateSize();validateNow();
'component id'.mx_internal::getTextField().wordWrap=true"
add this to your text component.