I have a requirement like two radio buttons with yes and no options and two textarea's and one button with name Continu开发者_开发百科e. Here my requirement is when i select yes it should show only continue button and when i select no button it should show two textarea controls and one button control.
Can anybody tell me this sol and provide me with some sample code.
Regards, Naveen.
Simple use property 'visible':
<mx:RadioButtonGroup id="radioGroup"/>
<mx:RadioButton id="radioYes"
groupName="{radioGroup}" value="Yes" selected="true"/>
<mx:RadioButton id="radioNo"
groupName="{radioGroup}" value="No"/>
<mx:Label text="First text"/>
<mx:TextArea id="textOne"
visible="{radioNo.selected}"/>
<mx:Label text="Second text"/>
<mx:TextArea id="textTwo"
visible="{radioNo.selected}" includeInLayout="{radioNo.selected}"/>
<mx:Button id="btnContinue"
label="Continue"/>
Please take attention at property 'includeInLayout'. In my solution one text area is hidden and takes no place, another one is hidden, but keeps reserved place.
精彩评论