Set Button label with SetProperty
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:states>
<mx:State name="enabled">
<mx:SetProperty target="{textinput}" name="enabled" value="{true}" />
<mx:SetEventHandler target="{button}" name="click" handler="currentState=''" />
<mx:SetProperty target="{button}" name="label" value="Disable" />
</mx:State>
</mx:states>
<mx:HBox id="hbox">
<mx:Button id="button" label="Enable" click="currentState='enabled'" />
<mx:TextInput id="textinput" enabled="false" text="example text" />
</mx:HBox>
</mx:Application>
Related examples in the same category