Radio Buttons act more like Combobox

Normally what I would do with radio buttons is to look for a click event and set variables accordingly.  However there is another way to use radio button if you are operating more in a 'filling out a form' approach.

Here it is <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="" layout="absolute"> <mx:Label text="{'Radio Selected :'+ rg.selectedValue.toString()}"/> <mx:RadioButtonGroup id="rg"/> <mx:RadioButton x="10" y="26" value="RADIO 1" selected="true" label="radio1" groupName="rg"/> <mx:RadioButton x="10" y="52" value="RADIO 2" label="radio2" groupName="rg"/> </mx:Application> It now works more like a combobox instead of individual buttons. The label will alwys show the button group's selected Value.

April 1, 2009| Tags :

Comments Section

Feel free to comment on the post but keep it clean and on topic.

comments powered by Disqus

About Me

Tommie Jones Software Development for Linux/Unix since 1995. I've done everything from Perl,C/C++,Java,Flash,php, ruby and currently node.js. Always interested in pushing technology one step further than expected.