Well ex. you want to browse for directory and then display results in textDisplay property.
And the code:
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="windowedapplication1_applicationCompleteHandler(event)"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; protected function windowedapplication1_applicationCompleteHandler(event:FlexEvent):void { var s:String = "myVeryVeryVeryLongString"; $myInput.text = s; $myInput.setFocus(); $myInput.textDisplay.selectRange($myInput.text.length,$myInput.text.length); $myInput.textDisplay.scrollToRange($myInput.text.length, $myInput.text.length); } ]]> </fx:Script> <s:TextInput id="$myInput" width="100" /> </s:WindowedApplication>
hope that helps you can find also textDisplay in spark TextArea.
0 ResponsesLeave a comment ?