<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12" creationComplete="initApp()">
<mx:Script>
<![CDATA[
import mx.events.DragEvent;
import mx.events.DataGridEvent;
internal function initApp():void{
dg.addEventListener(MouseEvent.CLICK,AddHandler);
}
internal function AddHandler(event:Event):void{
tip_txt.text = "你选择:"+dg.selectedItem.name+" and "+dg.selectedItem.author+" and "+dg.selectedItem.date;
}
]]>
</mx:Script>
<mx:Model id="books">
<datas>
<book>
<name>1</name>
<author>A</author>
<date>a</date>
</book>
<book>
<name>2</name>
<author>B</author>
<date>b</date>
</book>
<book>
<name>3</name>
<author>C</author>
<date>c</date>
</book>
</datas>
</mx:Model>
<mx:Label width="100%" color="#004080" text="选择"/>
<mx:DataGrid id="dg" width="100%" height="156" rowCount="5" dataProvider="{books.book}">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="sss"/>
<mx:DataGridColumn dataField="author" headerText="fff"/>
<mx:DataGridColumn dataField="date" headerText="dd" />
</mx:columns>
</mx:DataGrid>
<mx:TextInput id="tip_txt" width="482" height="197"/>
</mx:Application>
Photoshop|
Dreamweaver|
SVG|
WebGL|
Visual Studio|
PowerDesigner|
Eclipse|
Git|
Apache Ant|
Atom|
Composer|
CodeSmith|
Flex|
Gradle|
Maven|
Sublime Text3|
SVN|
Tableau|
Vim|
Chrome开发者工具|
OpenGL|
Unity|
Direct3D|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....