zoukankan      html  css  js  c++  java
  • Flex4学习笔记 checkBox RadioButton DropDownList colorPicker

    <?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" minWidth="955" minHeight="600">
      <fx:Script>
          <![CDATA[
              import mx.controls.Alert;
              public function showMsg(msg:String):void
              {
                  Alert.show(msg);
              }
          ]]>
      </fx:Script>
       <fx:Declarations>
           <s:RadioButtonGroup id="Spam" itemClick="showMsg('User picked'+event.currentTarget.selectedValue)"/>
       </fx:Declarations>
    <s:Panel width="400" height="150" title="选单控件" horizontalCenter="0" verticalCenter="0">
        <s:layout>
            <s:VerticalLayout/>
        </s:layout>
        <s:HGroup>
            <s:Label text="你的习惯:"/>
            <s:CheckBox id="cbVideoGames" label="光盘游戏" click="showMsg('光盘游戏是 '+ cbVideoGames.selected)"/>
            <s:CheckBox id="cbFishing" label="钓鱼" click="showMsg('钓鱼是') + cbFishing.selected"/>
        </s:HGroup>
        <s:HGroup>
            <s:Label fontWeight="bold" text="你喜欢罐头吗?"/>
            <s:RadioButton id="rbYes" value="Yes" groupName="罐头" click="showMsg('是')" label="是"/>
            <s:RadioButton id="rbNo" value="No" groupName="罐头" click="showMsg('否')" label="否"/>
        </s:HGroup>
        <s:HGroup>
            <s:Label fontWeight="bold" text="最爱的车:"/>
            <s:DropDownList id="combo" close="showMsg('最爱的车是  :  '+ event.currentTarget.selectedItem)">
                <mx:ArrayCollection>
                    <fx:String>法拉利</fx:String>
                    <fx:String>宝马</fx:String>
                    <fx:String>奔驰</fx:String>
                </mx:ArrayCollection>
            </s:DropDownList>
            <s:Label fontWeight="bold" text="喜欢的颜色"/>
             <mx:ColorPicker id="clr" change="showMsg('颜色是'+ event.currentTarget.selectedColor)" />
        </s:HGroup>
        
    </s:Panel>
    </s:Application>
    View Code

     checkBox RadioButton DropDownList  colorPicker

     

  • 相关阅读:
    BladeX部署说明(win7)
    vmware安装gho系统(win10上安装虚拟机然后在vmware上安装win7)
    Windows下mysql忘记root密码的解决方法
    三星(SAMSUNG)910S3L-K04 安装win7的BIOS设置
    delphi7 编译程序时报win32.indcu.a病毒的解决方法
    无法远程到2008R2的解决方法
    触发器学习
    centos6.5安装mongodb2.6
    02_Linux学习_命令
    C#逻辑面试题汇总【不断更新中】
  • 原文地址:https://www.cnblogs.com/zhugexiaobei/p/3210825.html
Copyright © 2011-2022 走看看