Exactly!!! I need to reset a form... And the trick works!!! Thank you :)
--- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote: > > Though in looking at the name of your radio button I'm guessing you're > resetting a form, in which case the selectedRadio trick is the thing to > try. > > > > ________________________________ > > From: Matt Chotin > Sent: Thursday, December 08, 2005 10:19 PM > To: 'flexcoders@yahoogroups.com' > Subject: RE: [flexcoders] How to deselect a RadioButtonGroup? > > > > The only way to do this is undocumented and therefore probably won't > work in Flex 2.0. Set rgpSex.selectedRadio = undefined; > > > > Normally I don't think a UI lets you de-select a radio group though, > instead you should have an option for "none" > > > > Matt > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of huhgawz > Sent: Wednesday, December 07, 2005 6:11 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] How to deselect a RadioButtonGroup? > > > > How to deselect a RadioButtonGroup? > > I try it using the next code but fails. > > After the application is loaded, I click the "getValue" button and the > label displays "Value: undefined" (this behaviour is ok). Then I click > the "Female" RadioButton and click the "getValue" button and the label > displays "Value: F" (this behaviour is ok too). Finally, I click the > "setUndefined" button to make the RadioButtonGroup selection undefined. > > In fact, the RadioButtonGroup has nothing selected visually but > when I click the "getValue" button the label displays "Value: F". I > wish the label displays again "Value: undefined" > > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"> > <mx:Script> > <![CDATA[ > function btnGetValue_Click():Void { > lblValue.text="Value: > "+rgpSex.selectedData.toString(); > } // btnGetValue_Click > > function btnSetUndefined_Click():Void { > rgpSex.selection.selected=false; > rgpSex.selection=undefined; > } // btnSetUndefined_Click > ]]> > </mx:Script> > > <mx:RadioButtonGroup id="rgpSex" /> > <mx:RadioButton id="optM" label="Male" groupName="rgpSex" data="M" > /> > <mx:RadioButton id="optF" label="Female" groupName="rgpSex" > data="F" /> > > <mx:Button label="getValue" click="btnGetValue_Click()" /> > <mx:Button label="setUndefined" click="btnSetUndefined_Click()" /> > > <mx:Label id="lblValue" /> > </mx:Application> > > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > SPONSORED LINKS > > Web site design development > <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+ > site+design+development&w2=Computer+software+development&w3=Software+des > ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac > tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> > > Computer software development > <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We > b+site+design+development&w2=Computer+software+development&w3=Software+d > esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr > actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> > > Software design and development > <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1= > Web+site+design+development&w2=Computer+software+development&w3=Software > +design+and+development&w4=Macromedia+flex&w5=Software+development+best+ > practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> > > Macromedia flex > <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+ > development&w2=Computer+software+development&w3=Software+design+and+deve > lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1 > 66&.sig=OO6nPIrz7_EpZI36cYzBjw> > > Software development best practice > <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice& > w1=Web+site+design+development&w2=Computer+software+development&w3=Softw > are+design+and+development&w4=Macromedia+flex&w5=Software+development+be > st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> > > > > > > ________________________________ > > YAHOO! GROUPS LINKS > > > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > > ________________________________ > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/