Set the Style Properties for Text Ranges : TextRange « Components « Flex






Set the Style Properties for Text Ranges

Set the Style Properties for Text Ranges
             
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:VBox >
        <mx:Script>
            
                import mx.controls.textClasses.TextRange;
    
                private function alterTextSnapshot():void
                {
                    var textRange:TextRange = new TextRange(area, true, area.selectionBeginIndex, area.selectionEndIndex);
                    textRange.color = 0xff0000;
                    textRange.letterSpacing = 3;
                }
    
          
        </mx:Script>
        <mx:TextArea change="alterTextSnapshot()" id="area" text="this is a test" width="200" height="50"/>
    </mx:VBox>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Set html text to TextRangeSet html text to TextRange
2.Set color for TextRangeSet color for TextRange
3.Set font size for TextRangeSet font size for TextRange
4.Set font style for TextRangeSet font style for TextRange
5.Set font weight for TextRangeSet font weight for TextRange
6.Set selection range for TextRangeSet selection range for TextRange
7.TextRange Selected TextTextRange Selected Text