#topicpath
----
//ここにコンテンツを記述します。
 <?xml version="1.0" encoding="utf-8"?>
  <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
    <!-- Primitive型の配列の定義 -->
    <mx:Script>
    <![CDATA[
	 var myArray = [1,2,3,4,5,6,7,8,9];
	]]>
	</mx:Script>
    <!-- Primitive型の配列の定義 以上 -->
    <!-- Objectの配列の定義 -->
    <mx:Array id="myArrayOfObjects">
      <mx:Object label="Q1" volume="1600" revenue="10000"/>
      <mx:Object label="Q2" volume="1500" revenue="9000"/>
      <mx:Object label="Q3" volume="1900" revenue="12000"/>
      <mx:Object label="Q4" volume="2300" revenue="14000"/>
    </mx:Array>
    <!-- Objectの配列の定義 以上 -->
    <mx:HBox>
      <mx:Panel label="Array Samples" title="sample">
        <mx:Form>
          <mx:FormHeading label="My Form"></mx:FormHeading>
          <mx:FormItem label="Pick a Number">
            <mx:ComboBox id="myCombo" dataProvider="{myArray}"/>
            <!-- さっきの配列をBind -->
          </mx:FormItem>
        </mx:Form>
        <mx:ControlBar>
          <mx:Label text="You chose:{myCombo.selectedItem}"/>
        </mx:ControlBar>
      </mx:Panel>
      <mx:Panel title="DataGrid">
        <mx:DataGrid id="datagrid" dataProvider="{myArrayOfObjects}">
          <!-- さっきの配列をBind -->
          <mx:columns>
            <mx:Array>
              <mx:DataGridColumn headerText="Label" columnName="label" />
              <mx:DataGridColumn headerText="Volume" columnName="volume" />
              <mx:DataGridColumn headerText="Revenue" columnName="revenue" />
            </mx:Array>
          </mx:columns>
        </mx:DataGrid>
        <mx:ControlBar>
          <mx:Label text="You chose:{datagrid.selectedItem.label}"/>
        </mx:ControlBar>
      </mx:Panel>
    </mx:HBox>
  </mx:Application>



----
この記事は
#vote(おもしろかった,そうでもない)

#comment
#topicpath


SIZE(10){現在のアクセス:&counter;}


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS