加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex 入门学习笔记3 之RadioButton和RadioButtonGroup

发布时间:2020-12-15 05:06:54 所属栏目:百科 来源:网络整理
导读:废话不说下面是代码 s:Label x="10" y="10" text="我是那年出生的?? "/ ? s:RadioButton id="rb1" x="25" y="48" label="90"/ ? s:RadioButton id="rb3" x="107" y="43" height="23" label="92"/ ? s:RadioButton id="rb2" x="66" y="48" label="91"/ ? s:

废话不说下面是代码

<s:Label x="10" y="10" text="我是那年出生的?? "/>
? <s:RadioButton id="rb1" x="25" y="48" label="90"/>
? <s:RadioButton id="rb3" x="107" y="43" height="23" label="92"/>
? <s:RadioButton id="rb2" x="66" y="48" label="91"/>
? <s:Button x="25" y="74" label="确定" click="button2_clickHandler(event)"/>

<s:VGroup x="272" y="27" click="ice()">
?? <s:RadioButton id="rbg1" label="按钮 1" groupName="radiogroup2"/>
?? <s:RadioButton id="rbg2" label="按钮 2" groupName="radiogroup2"/>
? </s:VGroup>

<fx:Script> ? <![CDATA[ ? ?? import mx.controls.*; ?? import mx.controls.Alert; ?? import mx.events.*; ?? var mym:Menu; ???? ?? protected function button2_clickHandler(event:MouseEvent):void ?? { ??? // TODO Auto-generated method stub ??? Alert.show(rb1.selected?'正确':'错误'); 一个小判断语句 相信大家都知道 ?? } ?? function ice():void ?? { ??? if (rbg1.selected) ??? { ???? Alert.show("按钮1"); ??? } ??? else ??? { ???? Alert.show("按钮2"); ??? } ?? } ?? ? ]]> </fx:Script>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读