Use an initialization function to set the text property to a string that contains these characters : Text « Components « Flex






Use an initialization function to set the text property to a string that contains these characters

Use an initialization function to set the text property to a string that contains these characters
          

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    initialize="initText()">
    <mx:Script>
        public function initText():void { 
            myText.text=" \n, \t, &lt;, greater than, &gt;, ampersand, &amp;, and apostrophe, ',    characters."; 
        }
    </mx:Script>
    <mx:Text width="450" id="myText" initialize="initText();" />
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Use the text property with standard text:Use the text property with standard text:
2.Creating a Text control with Creating a Text control with <mx:Text>
3.A multiline text string in a Text controlA multiline text string in a Text control
4.Use htmlText to display HTML textUse htmlText to display HTML text
5.text property changes the text displayed in text controlstext property changes the text displayed in text controls
6.htmltext taghtmltext tag
7.HTMLText With Condense WhiteHTMLText With Condense White
8.HTML Text With EntitiesHTML Text With Entities
9.Bind RichTextEdit html text value to TextBind RichTextEdit html text value to Text
10.The space between the editor and the text is created by the Spacer controlThe space between the editor and the text is created by the Spacer control
11.Text is Selectable static textText is Selectable static text
12.RichText with spanRichText with span
13.Using the text property with standard textUsing the text property with standard text
14.Using an initialization function to set the text property to a string that contains these charactersUsing an initialization function to set the text property to a string that contains these characters
15.Select the first 10 characters of various text controlsSelect the first 10 characters of various text controls
16.To select all text in a text control, use the selectAll() methodTo select all text in a text control, use the selectAll() method
17.The text in the controls update accordinglyThe text in the controls update accordingly
18.RichText unicodeRangeRichText unicodeRange
19.text property with standard texttext property with standard text
20.tag are not indented because any leading tab or space characters would appear in the displayed text.tag are not indented because any leading tab or space characters would appear in the displayed text.
21.Init TextInit Text
22.HTML formatted text, using MXML and ActionScript to specify the textHTML formatted text, using MXML and ActionScript to specify the text
23.HTMLTags inside htmlText of TextHTMLTags inside htmlText of Text
24.Using String properties and methods to get text indexes.Using String properties and methods to get text indexes.
25.Text ControlText Control
26.Display Gradient TextDisplay Gradient Text
27.Select the 10th line and then scrolls to that line when you click the buttonSelect the 10th line and then scrolls to that line when you click the button