How To Set Focus on UIComponent

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”;
layout=”absolute” width=”246″ height=”76″>
import mx.core.UIComponent;
public function setFocusTo(object:UIComponent):void
public function drawFocusTo(object:UIComponent):void
<mx:Button x=”10″ y=”10″ width=”226″
label=”my button” id=”myButton” />
<mx:Button x=”10″ y=”42″
label=”set focus” click=”setFocusTo(myButton)”/>
<mx:Button x=”103″ y=”42″
label=”set and draw focus” click=”drawFocusTo(myButton)”/>

Source :


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s