blob: 5cba546395821ae76dd56a54264a48c2cacc7746 [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.Text",
"baseClassname": "mx.controls.Label"
,
"description": "The Text control displays multiline, noneditable text. Use the Label control if you need only a single line of text. <p>The Text control does not support scroll bars. If you need scrolling, you should use a non-editable TextArea control.</p> <p>You can format the text in a Text control using HTML tags, which are applied after the control's CSS styles are applied. You can also put padding around the four sides of the text.</p> <p>The text in a Text control is selectable by default, but you can make it unselectable by setting the <code>selectable</code> property to <code>false</code>.</p> <p>If the control is not as wide as the text, the text will wordwrap. The text is always aligned top-left in the control.</p> <p>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 &quot;...&quot;. It's also common to use percentage widths and heights with Text.</p> <p>If you leave both the width and the height unspecified, Flex calculates them based on any explicit line breaks in the text, with no wordwrapping within lines. For example, if you set the <code>text</code> property, the newline character <code>&quot;\\n&quot;</code> causes a line break. If you set the <code>htmlText</code> property, the HTML markup <code>&lt;br&gt;</code> causes a line break. If your <code>text</code> or <code>htmlText</code> is lengthy and doesn't contain line breaks, you can get a very wide Text component; you can set the <code>maxWidth</code> to limit how wide the component is allowed to grow.</p> <p>Text controls do not have backgrounds or borders and cannot take focus.</p> <p>The Text control has the following default sizing characteristics:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>Flex sizes the control to fit the text, with the width long enough to fit the longest line of text and height tall enough to fit the number of lines. If you do not specify a pixel width, the height is determined by the number of explicit line breaks in the text string. If the text length changes, the control resizes to fit the new text.</td> </tr> <tr> <td>Minimum size</td> <td>0 pixels.</td> </tr> <tr> <td>ChMaximum sizear03</td> <td>10000 by 10000 pixels</td> </tr> </table> <p>The <code>&lt;mx:Text&gt;</code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n &lt;mx:Text\\n leading=&quot;2&quot;\\n /&gt;\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/TextExample.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.Label", "mx.controls.TextInput", "mx.controls.TextArea", "mx.controls.RichTextEditor"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.controls.Text",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
]
}