blob: 6e2a8aee2f2e66639f817a04580c722e81606c95 [file] [log] [blame]
{ "type": "class",
"qname": "mx.core.UITextField",
"baseClassname": "mx.core.UIComponent"
,
"description": "The UITextField class defines the component used by many Flex components to display text. For example, the mx.controls.Button control uses a UITextField component to define the label area of the Button control. <p>The UITextField class extends the flash.text.TextField class to support additional functionality required by Flex, such as CSS styles, invalidation/measurement/layout, enabling/disabling, tooltips, and IME (Input Method Editor) support for entering Chinese, Japanese, and Korean text.</p> <p>Warning: if UITextField inherits <code>layoutDirection=&quot;rtl&quot;</code>, it will modify its own <code>transform.matrix</code> to restore the default coordinate system locally.</p> This is mostly a copy of Label but with a DIV element instead of SPAN so we can measure text.",
"tags": [
{ "tagName": "see",
"values": ["flash.text.TextField", "mx.core.UITextFormat"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.core.UITextField",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "x",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "width",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "The width of the component. If no width has been previously set the default width may be specified in the IValuesImpl or determined as the bounding box around all child components and graphics.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6", "Flash 10.2", "AIR 2.6", "Flash 10.2", "AIR 2.6", "Flash 10.2", "AIR 2.6"]},
{ "tagName": "productversion",
"values": ["Royale 0.0", "Royale 0.0", "Royale 0.0", "Royale 0.0"]},
{ "tagName": "langversion",
"values": ["3.0", "3.0", "3.0", "3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "htmlText",
"namespace": "public",
"bindable": ["htmlChange"],
"details": [],
"deprecated": {},
"description": "Specifies the text displayed by the Label control, including HTML markup that expresses the styles of that text. When you specify HTML text in this property, you can use the subset of HTML tags that is supported by the Flash TextField control. <p>When you set this property, the HTML markup is applied after the CSS styles for the Label instance are applied. When you get this property, the HTML markup includes the CSS styles.</p> <p>For example, if you set this to be a string such as, <code>&quot;This is an example of &lt;b&gt;bold&lt;/b&gt; markup&quot;</code>, the text &quot;This is an example of <b>bold</b> markup&quot; appears in the Label with whatever CSS styles normally apply. Also, the word &quot;bold&quot; appears in boldface font because of the <code>&lt;b&gt;</code> markup.</p> <p>HTML markup uses characters such as &lt; and &gt;, which have special meaning in XML (and therefore in MXML). So, code such as the following does not compile:</p> <pre>\\n &lt;mx:Label htmlText=&quot;This is an example of &lt;b&gt;bold&lt;/b&gt; markup&quot;/&gt;\\n </pre> <p>There are three ways around this problem.</p> <ul> <li> <p>Set the <code>htmlText</code> property in an ActionScript method called as an <code>initialize</code> handler:</p> <pre>\\n &lt;mx:Label id=&quot;myLabel&quot; initialize=&quot;myLabel_initialize()&quot;/&gt;\\n </pre> <p>where the <code>myLabel_initialize</code> method is in a script CDATA section:</p> <pre>\\n &lt;fx:Script&gt;\\n &lt;![CDATA[\\n private function myLabel_initialize():void {\\n myLabel.htmlText = &quot;This is an example of &lt;b&gt;bold&lt;/b&gt; markup&quot;;\\n }\\n ]]&gt;\\n &lt;/fx:Script&gt;\\n \\n </pre> <p>This is the simplest approach because the HTML markup remains easily readable. Notice that you must assign an <code>id</code> to the label so you can refer to it in the <code>initialize</code> handler.</p> </li> <li> <p>Specify the <code>htmlText</code> property by using a child tag with a CDATA section. A CDATA section in XML contains character data where characters like &lt; and &gt; aren't given a special meaning.</p> <pre>\\n &lt;mx:Label&gt;\\n &lt;mx:htmlText&gt;&lt;![CDATA[This is an example of &lt;b&gt;bold&lt;/b&gt; markup]]&gt;&lt;/mx:htmlText&gt;\\n &lt;mx:Label/&gt;\\n </pre> <p>You must write the <code>htmlText</code> property as a child tag rather than as an attribute on the <code>&lt;mx:Label&gt;</code> tag because XML doesn't allow CDATA for the value of an attribute. Notice that the markup is readable, but the CDATA section makes this approach more complicated.</p> </li> <li> <p>Use an <code>hmtlText</code> attribute where any occurences of the HTML markup characters &lt; and &gt; in the attribute value are written instead as the XML &quot;entities&quot; <code>&amp;lt;</code> and <code>&amp;gt;</code>:</p> <pre>\\n &lt;mx:Label htmlText=&quot;This is an example of &amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt; markup&quot;/&amp;gt;\\n </pre> Adobe does not recommend this approach because the HTML markup becomes nearly impossible to read. </li> </ul> <p>If the <code>condenseWhite</code> property is <code>true</code> when you set the <code>htmlText</code> property, multiple white-space characters are condensed, as in HTML-based browsers; for example, three consecutive spaces are displayed as a single space. The default value for <code>condenseWhite</code> is <code>false</code>, so you must set <code>condenseWhite</code> to <code>true</code> to collapse the white space.</p> <p>If you read back the <code>htmlText</code> property quickly after setting it, you get the same string that you set. However, after the LayoutManager runs, the value changes to include additional markup that includes the CSS styles.</p> <p>Setting the <code>htmlText</code> property affects the <code>text</code> property in several ways. If you read the <code>text</code> property quickly after setting the <code>htmlText</code> property, you get <code>null</code>, which indicates that the <code>text</code> corresponding to the new <code>htmlText</code> has not yet been determined. However, after the LayoutManager runs, the <code>text</code> property value changes to the <code>htmlText</code> string with all the HTML markup removed; that is, the value is the characters that the Label actually displays.</p> <p>Conversely, if you set the <code>text</code> property, any previously set <code>htmlText</code> is irrelevant. If you read the <code>htmlText</code> property quickly after setting the <code>text</code> property, you get <code>null</code>, which indicates that the <code>htmlText</code> that corresponds to the new <code>text</code> has not yet been determined. However, after the LayoutManager runs, the <code>htmlText</code> property value changes to the new text plus the HTML markup for the CSS styles.</p> <p>To make the LayoutManager run immediately, you can call the <code>validateNow()</code> method on the Label. For example, you could set some <code>htmlText</code>, call the <code>validateNow()</code> method, and immediately obtain the corresponding <code>text</code> that doesn't have the HTML markup.</p> <p>If you set both <code>text</code> and <code>htmlText</code> properties in ActionScript, whichever is set last takes effect. Do not set both in MXML, because MXML does not guarantee that the properties of an instance get set in any particular order.</p> <p>Setting either <code>text</code> or <code>htmlText</code> property inside a loop is a fast operation, because the underlying TextField that actually renders the text is not updated until the LayoutManager runs.</p> <p>If you try to set this property to <code>null</code>, it is set, instead, to the empty string. If the property temporarily has the value <code>null</code>, it indicates that the <code>text</code> has been recently set and the corresponding <code>htmlText</code> has not yet been determined.</p>",
"tags": [
{ "tagName": "default",
"values": [""""]},
{ "tagName": "see",
"values": ["flash.text.TextField#htmlText"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "text",
"namespace": "public",
"bindable": ["textChange"],
"details": [],
"deprecated": {},
"description": "The text to display in the label.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6"]},
{ "tagName": "productversion",
"values": ["Royale 0.0"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "data",
"namespace": "public",
"bindable": ["dataChange"],
"details": [],
"deprecated": {},
"description": "Lets you pass a value to the component when you use it in an item renderer or item editor. You typically use data binding to bind a field of the <code>data</code> property to a property of this component. <p>When you use the control as a drop-in item renderer or drop-in item editor, Flex automatically writes the current value of the item to the <code>text</code> property of this control.</p> <p>You do not set this property in MXML.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "see",
"values": ["mx.core.IDataRenderer"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredHeight",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.core.UIComponent#measuredHeight"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredWidth",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.core.UIComponent#measuredWidth"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "styleName",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.core.UIComponent#styleName"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "move",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.core.UIComponent#move()"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "x", "type": "Number"},
{ "name": "y", "type": "Number"}]}
,
{ "type": "method",
"qname": "setActualSize",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.core.UIComponent#setActualSize()"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "w", "type": "Number"},
{ "name": "h", "type": "Number"}]}
,
{ "type": "method",
"qname": "getStyle",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.core.UIComponent#getStyle()"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "*",
"params": [{ "name": "styleProp", "type": "String"}]}
,
{ "type": "method",
"qname": "setColor",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sets the font color of the text.",
"tags": [
{ "tagName": "param",
"values": ["color The new font color."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "color", "type": "uint"}]}
,
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "selectable",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "getCharIndexAtPoint",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "method",
"qname": "truncateToFit",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"return": "Boolean",
"params": [{ "name": "truncationIndicator", "type": "String"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "textWidth",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "textHeight",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "wordWrap",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}}]
}