?
Solved

Variable within value of radio button

Posted on 2011-05-04
2
Medium Priority
?
251 Views
Last Modified: 2012-05-11
In Flex 3, I have a radio button group with 4 radio buttons.  On one of these buttons I would like to include a variable within the VALUE assignment:

Example:  
<mx:RadioButton x="35" y="55" label="=" value="WHERE DispensedAmount = MYVARIABLE" textRollOverColor="#FFFFFF" groupName="AmountRadioGroup" fontFamily="Arial" color="#FFFFFF" fontSize="12" id="AmountRadioButton2"/>

Also, on another radio button I would like to include the contents of a text box within the value assignment:

<mx:RadioButton x="35" y="55" label="=" value="WHERE DispensedAmount = myText.text" textRollOverColor="#FFFFFF" groupName="AmountRadioGroup" fontFamily="Arial" color="#FFFFFF" fontSize="12" id="AmountRadioButton3"/>

0
Comment
Question by:deross
2 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 2000 total points
ID: 35695377
try this:
[Bindable]
private var MYVARIABLE:String = "";

<mx:RadioButton x="35" y="55" label="=" value="{MYVARIABLE}" textRollOverColor="#FFFFFF" groupName="AmountRadioGroup" fontFamily="Arial" color="#FFFFFF" fontSize="12" id="AmountRadioButton2"/>

Also, on another radio button I would like to include the contents of a text box within the value assignment:

<mx:RadioButton x="35" y="55" label="=" value="{myText.text}" textRollOverColor="#FFFFFF" groupName="AmountRadioGroup" fontFamily="Arial" color="#FFFFFF" fontSize="12" id="AmountRadioButton3"/>

Open in new window

Note the curly brackets.

Warm Regards
Deepanjan Das
0
 

Author Closing Comment

by:deross
ID: 35695665
Great Thanks
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question