FlexTip: mx:Text vs. mx:TextArea
Streda, Júl 18th, 2007Table of contents for flex-tips
- FlexTips
- FlexTip: mx:Text vs. mx:TextArea
- FlexTip: XMLSocket connect() after disconnect from server
- FlexTip: Problem with masks and scalable Flash
- FlexTips: How to add Bitmap to UIComponent
- FlexTip – Stop displaying Focus
- FlexTip: Preventing CheckBox selection with Key.SPACE
- FlexTip: WordWrap for mx:Text
- FlexTip: Add Thumbs to Mx:Slider programatically
- AS3 Conditional Breakpoint – enterDebugger()
Here my first tip for Flex developers. Maybe many of you know, maybe it will be helpful for someone. If you want make custom component, let’s say “Message dialog” which should be resized according text, nothing is easier. Just use mx:Text, not mx:TextArea. mx:Text has ability to resize according its text property. If you don’t specify widht and height, width and height i resized for mx:Text. If you specify one property (width or height), second one will be resized when text will be longer. For mx:TextArea just scrollbars will appear.
| Play with example and look into source code. |
![]() |

1 Comments
diego
• Visit Site
November 27th, 2007
hi,
Is there a maximum fontSize that can be displayed in a Text Component (or TextField, TextArea, etc)? Because whenever I try to display a font size greater than 150, the size doesn’t change. Any help with this would be very appreciated. I’ve searched around some and I’m not seeing much written on it. I’ve tried this with both embedded and non embedded fonts.
thanks.
Diego
Sorry, comments for this entry are closed at this time.