1. 在datagrid里面 加入链接
链接新窗口显示相关的图片
。
如下
方法:
/**
* 原作查看大图 yanek 增加该方法
*/
public function viewBigImage():void{
//选中的行数
var k:int = this.originalPicList.selectedIndex;
//Alert.show("k="+k);
//获取dataGrid中的数据
var arr : Array =(originalPicList.dataProvider as ArrayCollection).source;
//获取当前选中行的dictType列的数据
var path:String = arr[k]["picUrlImage"].toString();
var path1:String = this.originalPicList.selectedItem.picUrlImage;
//Alert.show("path="+path);
var window : ViewBigImage = PopUpManager.createPopUp(this,ViewBigImage,true) as ViewBigImage;
window.owner = this;
//window.bigimage.source = path;
window.bigimage.source = path1;
PopUpManager.centerPopUp(window);//弹出子窗口
}
//
注意:取得路径的方法 var path1:String = this.originalPicList.selectedItem.picUrlImage;
弹出新窗口代码:ViewBigImage.mxml
flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" close="PopUpManager.removePopUp(this)" title="大图查看" width="681" height="498">
height="391" id="bigimage"/>
链接新窗口显示相关的图片
。
如下
方法:
/**
* 原作查看大图 yanek 增加该方法
*/
public function viewBigImage():void{
//选中的行数
var k:int = this.originalPicList.selectedIndex;
//Alert.show("k="+k);
//获取dataGrid中的数据
var arr : Array =(originalPicList.dataProvider as ArrayCollection).source;
//获取当前选中行的dictType列的数据
var path:String = arr[k]["picUrlImage"].toString();
var path1:String = this.originalPicList.selectedItem.picUrlImage;
//Alert.show("path="+path);
var window : ViewBigImage = PopUpManager.createPopUp(this,ViewBigImage,true) as ViewBigImage;
window.owner = this;
//window.bigimage.source = path;
window.bigimage.source = path1;
PopUpManager.centerPopUp(window);//弹出子窗口
}
//
注意:取得路径的方法 var path1:String = this.originalPicList.selectedItem.picUrlImage;
弹出新窗口代码:ViewBigImage.mxml
flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" close="PopUpManager.removePopUp(this)" title="大图查看" width="681" height="498">
height="391" id="bigimage"/>