Default Button doesn't work
i using form , trying put default button using defaultbutton property doesn't work, there else need do?
here working example of default button in form know youve been asking awhile, sorry.
<?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*">
<mx:script>
<![cdata[
import blackmesa.ui;
function printinput():void
{
labelresult.text= tiinput.text.tostring();
}
]]>
</mx:script>
<mx:form x="554" y="251" width="250" height="250" defaultbutton="{buttondefault}">
<mx:formitem label="label">
<mx:textinput id="tiinput"/>
</mx:formitem>
<mx:formitem id="buttonsubmit">
<mx:button label="button" click="{printinput()}" id="buttondefault"/>
</mx:formitem>
<mx:formitem label="label">
<mx:label text="input" id="labelresult"/>
</mx:formitem>
</mx:form>
</mx:application>
the concept here add functionality button control, give id, in form call button through defaultbutton property , executes associated button control, make sure when specify button use specify {object}, hope example above helps, tested before posting.
<?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*">
<mx:script>
<![cdata[
import blackmesa.ui;
function printinput():void
{
labelresult.text= tiinput.text.tostring();
}
]]>
</mx:script>
<mx:form x="554" y="251" width="250" height="250" defaultbutton="{buttondefault}">
<mx:formitem label="label">
<mx:textinput id="tiinput"/>
</mx:formitem>
<mx:formitem id="buttonsubmit">
<mx:button label="button" click="{printinput()}" id="buttondefault"/>
</mx:formitem>
<mx:formitem label="label">
<mx:label text="input" id="labelresult"/>
</mx:formitem>
</mx:form>
</mx:application>
the concept here add functionality button control, give id, in form call button through defaultbutton property , executes associated button control, make sure when specify button use specify {object}, hope example above helps, tested before posting.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment