メソッド | プロパティ | エフェクト | イベント | スタイル | フレームあり | フレームなし

mx.controls
RadioButton クラス

継承を示す線継承を示す線継承を示す線継承を示す線


RadioButton クラス
mx.controls.Button の拡張

RadioButton コントロールを使用すると、一連の相互排他的な選択肢の中から 1 つだけをユーザーに選択させることができます。RadioButton グループは、同じ groupName を持つ複数の RadioButton コントロールから構成されます。このグループは、<mx:RadioButtonGroup> タグで作成したグループを参照できます。ユーザーは、グループ内のメンバーを一度に 1 つしか選択できません。選択されていないグループメンバーを選択すると、同じグループ内でそれまで選択されていた RadioButton コントロールは選択解除されます。

MXML シンタックス

<mx:RadioButton> タグは、親クラスのすべてのプロパティと、次のプロパティを継承します。

 <mx:RadioButton
data=""
groupName="No default."
label="No default."
labelPlacement="right|left|top|bottom"
selected="false|true"
selectedData="No default."
toggle="false|true"
click="Event handler; no default"
/>

を参照するにはここをクリックしてください

関連項目
    RadioButtonGroup



メソッド

mx.core.UIComponent クラスから継承されるメソッド
drawFocus   getFocus   getFocusManager   setEnabled   setFocus  

mx.core.UIObject クラスから継承されるメソッド
addEventListener   applyProperties   buildDepthTable   commitProperties   constructObject2   createAccessibilityImplementation   createChildAtDepth   createChildren   createClassChildAtDepth   createClassObject   createEmptyObject   destroyObject   dispatchEvent   doLater   draw   drawRect   executeBindings   fillRect   findNextAvailableDepth   getRepeaterItem   getStyle   handleEvent   init   invalidate   invalidateLayout   invalidateProperties   invalidateSize   invalidateStyle   layoutChildren   measure   move   redraw   removeEventListener   setDepthAbove   setDepthBelow   setMask   setSize   setSizeNoLayout   setStyle   swapDepths  



プロパティ
       data :Object
(オプション) ラジオボタンインスタンスに関連付けられるユーザー定義データ値です。
       groupName:String
ラジオボタンの名前です。
       label:String
そのコントロールのテキストラベルです。
       labelPlacement:String
RadioButton アイコンに対してラベルを配置する方向です。
       selected:Boolean
true の場合、ボタンはトグル状態です。
       toggle:var
true の場合、RadioButton コントロールをトグル切り替えできます。
staticversion:String
このクラスのバージョンを表すストリングです。

mx.controls.Button クラスから継承されるプロパティ
icon   label   labelPlacement   version  

mx.controls.SimpleButton クラスから継承されるプロパティ
falseDisabledSkin   falseDownSkin   falseOverSkin   falseUpSkin   selected   toggle   trueDisabledSkin   trueDownSkin   trueOverSkin   trueUpSkin   version  

mx.core.UIComponent クラスから継承されるプロパティ
enabled   errorString   tabEnabled   tabIndex   version  

mx.core.UIObject クラスから継承されるプロパティ
alpha   baselinePosition   className   depth   documentDescriptor   height   heightFlex   id   instanceIndices   isDocument   kStretch   layoutHeight   layoutWidth   maxHeight   maxWidth   minHeight   minWidth   mouseX   mouseY   nestLevel   oldHeight   oldWidth   oldX   oldY   parent   parentApplication   parentDocument   percentHeight   percentWidth   preferredHeight   preferredWidth   repeaterIndices   scaleX   scaleY   styleName   tabEnabled   toolTip   version   visible   width   widthFlex   x   y  



エフェクト

mx.core.UIComponent クラスから継承されるエフェクト
focusInEffect   focusOutEffect  

mx.core.UIObject クラスから継承されるエフェクト
creationCompleteEffect   hideEffect   mouseDownEffect   mouseOutEffect   mouseOverEffect   mouseUpEffect   moveEffect   resizeEffect   showEffect  



イベント
clickユーザーが RadioButton コントロールを選択したときにブロードキャストします。このイベントオブジェクトの target プロパティには、イベントをトリガしたコンポーネントへの参照が含まれます。type プロパティには、イベントの名前 click が含まれます。

mx.controls.Button クラスから継承されるイベント
click 

mx.controls.SimpleButton クラスから継承されるイベント
buttonDown  buttonDragOut  click 

mx.core.UIComponent クラスから継承されるイベント
focusIn  focusOut  invalid  keyDown  keyUp  valid  valueCommitted 

mx.core.UIObject クラスから継承されるイベント
creationComplete  dragComplete  dragDrop  dragEnter  dragExit  dragOver  draw  effectEnd  effectStart  hide  hideToolTip  initialize  load  mouseChangeSomewhere  mouseDown  mouseDownSomewhere  mouseMove  mouseMoveSomewhere  mouseOut  mouseOver  mouseUp  mouseUpSomewhere  move  resize  show  showToolTip  unload 



スタイル

mx.controls.Button クラスから継承されるスタイル
borderThickness   cornerRadius   horizontalGap   textRollOverColor   textSelectedColor   verticalGap  

mx.controls.SimpleButton クラスから継承されるスタイル
repeatDelay   repeatInterval  

mx.core.UIComponent クラスから継承されるスタイル
backgroundAlpha   backgroundColor   backgroundDisabledColor   backgroundImage   backgroundSize   barColor   borderCapColor   borderColor   borderSides   borderStyle   borderThickness   cornerRadius   disabledColor   dropShadow   errorColor   fillColors   highlightColor   modalTransparency   scrollTrackColor   selectedFillColors   shadowCapColor   shadowColor   shadowDirection   shadowDistance   symbolBackgroundColor   symbolBackgroundDisabledColor   symbolBackgroundPressedColor   symbolColor   symbolDisabledColor   themeColor  

mx.core.UIObject クラスから継承されるスタイル
color   fontFamily   fontSize   fontStyle   fontWeight   horizontalGap   leading   marginLeft   marginRight   textAlign   textDecoration   textIndent   verticalGap  



プロパティの詳細

data

data :Object  

(オプション) ラジオボタンインスタンスに関連付けられるユーザー定義データ値です。


groupName

groupName:String  

ラジオボタンの名前です。


label

label:String  

そのコントロールのテキストラベルです。デフォルトでは、ラベルは RadioButton コントロールの右に表示されます。


labelPlacement

labelPlacement:String  

RadioButton アイコンに対してラベルを配置する方向です。指定できる値は、rightleftbottom、および top です。デフォルト値は right です。


selected

selected:Boolean  

true の場合、ボタンはトグル状態です。デフォルト値は false です。


toggle

toggle:var  

true の場合、RadioButton コントロールをトグル切り替えできます。false の場合、RadioButton はプッシュボタンのように動作します。デフォルト値は false です。


version

static  version:String  

このクラスのバージョンを表すストリングです。


RadioButtonExample.mxml
<?xml version="1.0" encoding="utf-8"?>
<!-- RadioButton コントロールの使用方法を示す簡単な例 -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">

<mx:Script>
<![CDATA[
        
import mx.controls.Alert;

	   function showSelected(event)
	   {
if(event == "Flex")
		  {
		      flexicon.visible= true;
		      flashicon.visible= false;
		  }
		  else
		  {
		      flashicon.visible= true;
		      flexicon.visible= false;
		  }		    
	   }
	   
       ]]>
</mx:Script>

<mx:Panel title="Radio Button Panel" backgroundColor="#FFFFFF">

<mx:HBox>

<mx:VBox>

<mx:Image id="flexicon" source="@Embed('FlexLogo.gif')" visible="false"/>
<mx:Image id="flashicon" source="@Embed('flash.gif')" visible="false"/>

</mx:VBox>

<mx:VBox>

<mx:RadioButton id="Flex" label="Flex" click="showSelected(event.target.label);"
color="#0000FF"/>
<mx:RadioButton id="Flash" label="Flash" click="showSelected(event.target.label);"
color="#0000FF"/>

</mx:VBox>

</mx:HBox>

<mx:Label text=" *click on radio button to see images." color="#CC0000"/>

</mx:Panel>

</mx:Application>