Note that there are some explanatory texts on larger screens.

plurals
  1. POPopulating textbox using flex
    primarykey
    data
    text
    <p>In the below code.If buttom 'A' is pressed the text box should be populated with A, and if button 'B' is pressed it should be populated with B and so on.. Can this be done.Also if any one could point me to flex examples would be much helpful.Thanks..</p> <pre><code> s='A'; for(i=0;i&lt;button.length;i++) { txtLogin.text+=s; s++; } </code></pre> <p>Original code..</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt; &lt;mx:Button label="A" click="clickhandler(event)" x="1" /&gt; &lt;mx:Button label="B" click="clickhandler(event)" x="101" /&gt; &lt;mx:Button label="C" click="clickhandler(event)" x="201" /&gt; &lt;mx:Button label="D" click="clickhandler(event)" x="301" /&gt; &lt;mx:Button label="E" click="clickhandler(event)" x="401" /&gt; &lt;mx:Button label="F" click="clickhandler(event)" x="501" /&gt; &lt;mx:Button label="G" click="clickhandler(event)" x="601" /&gt; &lt;mx:Button label="H" click="clickhandler(event)" x="701" /&gt; &lt;mx:Button label="I" click="clickhandler(event)" x="801" /&gt; &lt;mx:Button label="J" click="clickhandler(event)" x="901" /&gt; &lt;mx:Button label="K" click="clickhandler(event)" x="1001" /&gt; &lt;mx:Script&gt; &lt;![CDATA[ import mx.controls.Button; import mx.controls.Alert; public function clickhandler(event:Event):void { var button:Button=event.target as Button; var i:int; var s:String; s='A'; for(i=0;i&lt;button.length;i++) { txtLogin.text+=s; s++; } /* if (button.label=='A') { txtLogin.text+="A"; //mx.controls.Alert.show("Button1"); } if (button.label=="B") { txtLogin.text+="B"; //mx.controls.Alert.show("Button2"); } */ } ]]&gt; &lt;/mx:Script&gt; &lt;mx:TextInput x="231" y="175" id="txtLogin"/&gt; &lt;/mx:Application&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload