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

     

  • 相关阅读:
    zoj 3599 Game 博弈论
    hdu 2486/2580 / poj 3922 A simple stone game 博弈论
    hdu 1517 A Multiplication Game 博弈论
    hdu 4407 Sum 容斥原理
    hdu 4686 Arc of Dream
    hdu 4588 Count The Carries
    hdu 4586 Play the Dice
    C#学习(5)
    C#学习(4)
    C#学习(3)
  • 原文地址:https://www.cnblogs.com/zhugexiaobei/p/3210825.html
Copyright © 2011-2022 走看看