欢迎光临
我们一直在努力

arrow flex是什么RadioButton - AS3 Flex

语言版本:  ActionScript 3.0
产品版本:  Flex 4
运行时版本:  Flash Player 10, AIR 1.5

RadioButton 组件使用户可在一组互相排斥的选择中做出一种选择。RadioButtonGroup 包含具有相同 groupName 属性的两个或更多 RadioButton 组件。当可以选择在 RadioButtonGroup 中组合 RadioButton 实例时,组使您能够执行诸如在一组 RadioButton 上(而不是在每个单独的 RadioButton 上)设置单一事件处理函数等事项。

RadioButton 组可以引用 <s:RadioButtonGroup> 标签创建的组。用户一次只能选择此组中的一个成员。选择未选中的组成员将取消选择该组中当前所选的 RadioButton 组件。

要在基于列表的组件(如 List 或 DataGrid)中使用此组件,请创建项呈示器。有关创建项呈示器的信息,请参阅自定义 Spark 项呈示器。

RadioButton 组件具有以下默认特征:

expanded隐藏 MXML 语法

The <s:RadioButton> tag inherits all of the tag
attributes of its superclass, and adds the following tag attributes:

  <s:RadioButton
    Properties
    enabled=""
    group="the automatically created default RadioButtonGroup"
    groupName="radioGroup"
    value="null"
  />
  

label

查看示例


样式为常见样式,或与特定主题关联。如果为常见样式,则可以用于任何主题。如果样式与特定主题关联,则只有应用程序使用该主题时才能使用该样式。

  样式 说明 由以下参数定义 String 是
语言版本: ActionScript 3.0
 产品版本: Flex 4
 运行时版本: Flash10, AIR 1.5

指定该元素的哪条基线对齐到 alignmentBaseline 以确定元素在该行上的垂直位置. Number Time 否
语言版本: ActionScript 3.0
 产品版本: Flex 4
 运行时版本: Flash10, AIR 1.5

在第一个 buttonDown 事件之后,以及相隔每个 repeatInterval 重复一次 buttonDown 事件之前,需要等待的毫秒数. Number Time 否
语言版本: ActionScript 3.0
 产品版本: Flex 4
 运行时版本: Flash10, AIR 1.5

用户在按钮上按住鼠标时,buttonDown 事件之间相隔的毫秒数.

  样式 说明 由以下参数定义 String 否 mobile
语言版本: ActionScript 3.0
 产品版本: Flex 4
 运行时版本: Flash10, AIR 1.5

与标签相关的图标的方向。有效的 MXML 值是 rightleftbottomtop

在 ActionScript 中,您可以使用下列常量来设置此属性:IconPlacement.RIGHTIconPlacement.LEFTIconPlacement.BOTTOMIconPlacement.TOP

默认值为 IconPlacement.LEFT

enabled:Boolean[覆盖]

语言版本:  ActionScript 3.0
产品版本:  Flex 4
运行时版本:  Flash Player 10, AIR 1.5

如果 RadioButtonGroup 启用,则 RadioButton 组件启用,且 RadioButton 本身也启用。

    override public function get enabled():Boolean
    override public function set enabled(value:Boolean):void

group:RadioButtonGroup

语言版本:  ActionScript 3.0
产品版本:  Flex 4
运行时版本:  Flash Player 10, AIR 1.5

此 RadioButton 所属的 RadioButtonGroup 组件。创建要放入 RadioButtonGroup 中的 RadioButton 时,应该对所有按钮使用 group 属性或者 groupName 属性。

默认值为 the automatically created default RadioButtonGroup。

    public function get group():RadioButtonGroup
    public function set group(value:RadioButtonGroup):void

groupName:String

语言版本:  ActionScript 3.0
产品版本:  Flex 4
运行时版本:  Flash Player 10, AIR 1.5

指定此 RadioButton 组件所属的组的名称,或者,如果此 RadioButton 是 RadioButtonGroup 组件定义的组的一部分,则指定 RadioButtonGroup 组件的 ID 属性值。具有相同 groupName 属性的所有单选按钮都将位于同一个选项卡组。

创建要放入 RadioButtonGroup 中的单选按钮时,建议对所有按钮使用 group 属性或者 groupName 属性。

默认值为 "radioGroup"。

    public function get groupName():String
    public function set groupName(value:String):void

value:Object

语言版本:  ActionScript 3.0
产品版本:  Flex 4
运行时版本:  Flash Player 10, AIR 1.5

与 RadioButton 组件关联的可选用户定义值。

默认值为 null。

此属性可用作数据绑定的源。修改此属性后,将调度 valueChanged 事件。

    public function get value():Object
    public function set value(value:Object):void

public function RadioButton()

语言版本:  ActionScript 3.0
产品版本:  Flex 4
运行时版本:  Flash Player 10, AIR 1.5

构造函数。

<?xml version="1.0"?>
<!-- controlsbuttonRBEvent.mxml -->
<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">

    <fx:Script>
        <![CDATA[   

            import flash.events.Event;

            private function handleNonstop(event:Event):void {
                // Handle event.
                myTA.text="You selected nonstop flights";
            }

            private function handleOneStop(event:Event):void {
                // Handle event.
                myTA.text="You selected one stop";
            }

            private function handleTwoStops(event:Event):void {
                // Handle event.
                myTA.text="You selected two stops";
            }
        ]]>
    </fx:Script>
    <s:VGroup paddingLeft="10" paddingTop="10">
        <s:RadioButton groupName="numStops" 
                       id="nonStop"
                       label="Nonstop flights only" 
                       width="150" 
                       click="handleNonstop(event);"/>
        <s:RadioButton groupName="numStops" 
                       id="oneStop"
                       label="One stop" 
                       width="150" 
                       click="handleOneStop(event);"/>
        <s:RadioButton groupName="numStops" 
                       id="twoStops"
                       label="Two stops" 
                       width="150" 
                       click="handleTwoStops(event);"/>
        <s:TextArea id="myTA"/>
    </s:VGroup>
</s:Application>


赞(0)
未经允许不得转载:上海聚慕医疗器械有限公司 » arrow flex是什么RadioButton - AS3 Flex

登录

找回密码

注册