RadioButtonGroup的使用
来源:互联网 发布:淘宝网浮针进针器 编辑:程序博客网 时间:2024/05/29 15:16
1、
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"> <mx:Script> <![CDATA[ import mx.events.ItemClickEvent; private function radioGroup_itemClick(evt:ItemClickEvent):void { var now:String = new Date().toTimeString(); lbl.text = evt.label + " (" + now + ")"; } ]]> </mx:Script> <mx:ApplicationControlBar dock="true"> <mx:Label id="lbl" fontWeight="bold" /> </mx:ApplicationControlBar> <mx:RadioButtonGroup id="radioGroup" itemClick="radioGroup_itemClick(event);" /> <mx:VBox> <mx:RadioButton id="radioButton1" label="Red" group="{radioGroup}" /> <mx:RadioButton id="radioButton2" label="Orange" group="{radioGroup}" /> <mx:RadioButton id="radioButton3" label="Yellow" group="{radioGroup}" /> <mx:RadioButton id="radioButton4" label="Green" group="{radioGroup}" /> <mx:RadioButton id="radioButton5" label="Blue" group="{radioGroup}" /> </mx:VBox> </mx:Application>2、
<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" viewSourceURL="srcview/index.html"> <fx:Script> <![CDATA[ protected function scoreClickHandler(event:MouseEvent):void { var score:Number = 0.0; if (group1.selectedValue=="True") score=33.34; if (group2.selectedValue=="South Africa") score=score+33.34; if (group3.selectedValue=="False") score=score+33.34; scoreText.text = "You scored " + numberFormatter.format(score).toString()+"%"; } ]]> </fx:Script> <fx:Declarations> <s:RadioButtonGroup id="group1"/> <s:RadioButtonGroup id="group2"/> <s:RadioButtonGroup id="group3"/> <mx:NumberFormatter id="numberFormatter" precision="0" rounding="nearest"/> </fx:Declarations> <fx:Style> @namespace "library://ns.adobe.com/flex/spark"; RadioButton{ baseColor: #FFFFFF; } </fx:Style> <!-- Note: A custom panel skin is used for the Tour de Flex samples and is included in the source tabs for each sample. --> <s:Panel title="RadioButton Sample" width="100%" height="100%" skinClass="skins.TDFPanelSkin"> <s:HGroup horizontalCenter="0" top="10"> <s:VGroup> <s:Label text="1) The sky is blue:"/> <s:RadioButton id="trueRadioBtn" label="True" groupName="group1"/> <s:RadioButton id="falseRadioBtn" label="False" groupName="group1"/> </s:VGroup> <s:VGroup paddingLeft="20"> <s:Label text="2) Which of the following is not a continent?"/> <s:RadioButton id="multiRadioBtnA" label="North America" groupName="group2"/> <s:RadioButton id="multiRadioBtnB" label="Europe" groupName="group2"/> <s:RadioButton id="multiRadioBtnC" label="Asia" groupName="group2"/> <s:RadioButton id="multiRadioBtnD" label="South Africa" groupName="group2"/> </s:VGroup> <s:VGroup paddingLeft="20"> <s:Label text="3) Tallahasee is the capital of Alabama:"/> <s:RadioButton id="trueRadioBtn3" label="True" groupName="group3" /> <s:RadioButton id="falseRadioBtn3" label="False" groupName="group3"/> </s:VGroup> <s:VGroup horizontalAlign="contentJustify"> <s:Button id="scoreBtn" label="Score Me!" click="scoreClickHandler(event)"/> <s:Label id="scoreText"/> </s:VGroup> </s:HGroup> <s:Label bottom="20" left="5" width="100%" verticalAlign="justify" color="#323232" text="The RadioButton control is a single choice in a set of mutually exclusive choices. A RadioButton group is composed of two or more RadioButton controls withthe same group name. Only one member of the group can be selected at any given time." /> </s:Panel> </s:Application>
- RadioButtonGroup的使用
- flash as3的单选框RadioButtonGroup的使用
- 使用RadioButtonGroup 取值和赋值的例子
- 使用RadioButtonGroup 取值和赋值的例子
- flex中使用RadioButtonGroup时如何取出所选项的值
- RadioButton和RadioButtonGroup按钮的实现
- 循环访问RadioButtonGroup中的各个子项的值
- Flex中获取RadioButtonGroup中的RadioButton的值
- flashbuilder4 单选 RadioButton RadioButtonGroup
- Revit二次开发 RadioButtonGroup设置被选中按钮
- 检测RadioButtonGroup控件中的哪个RadioButton被选中.
- 找不到类型,或者不是编译时常数:RadioButtonGroup
- flex 入门学习笔记3 之RadioButton和RadioButtonGroup
- ReferenceError: Error #1069: 在 spark.components.RadioButtonGroup 上找不到属性 label,且没有默认值
- GUID使用的使用
- ${}的使用
- 的使用
- @[],@()的使用
- real media格式(rm/rmvb容器格式)
- 2011年 下半年 C++程序设计(五)
- C++下按二进制读写文件
- Android: Git/Gerrit/Repo 的使用 <二>
- 基于继承的多态实现
- RadioButtonGroup的使用
- 2011年 下半年 C++程序设计(六)
- uboot结构与使用
- android用户定位GPS开发(一)
- 2011年 下半年 C++程序设计(七)
- solr 3.5 配置及应用(三)
- 精妙sql一
- [SQL2005]SSIS 使用 OLE DB Command Transformation 组件
- 2011年 下半年 C++程序设计(八)