zoukankan      html  css  js  c++  java
  • DataGrid 表格中嵌入图片

    主文件关键代码如下:

    import fl.controls.listClasses.CellRenderer;
    Arr.push({data:"images/ie.jpg",//此处要跟后面类中的名称一致
                  "Job No.":JobListXML[i].@JobNo
                 })
    var colH:DataGridColumn = new DataGridColumn();
    colH=DG.getColumnAt(DG.getColumnIndex("ico"));//这里是列名
    colH.cellRenderer = LoaderCellRenderer;
    

     LoaderCellRenderer.as

     package {
             import fl.containers.UILoader;
             import fl.controls.listClasses.ICellRenderer;
             import fl.controls.listClasses.ListData;
             import fl.core.InvalidationType;
             import fl.data.DataProvider;
             import flash.events.Event;
             public class LoaderCellRenderer extends UILoader implements ICellRenderer {
                 protected var _data:Object;
                 protected var _listData:ListData;
                 protected var _selected:Boolean;
                 public function LoaderCellRenderer():void {
                     super();
                 }
                 public function get data():Object {
                     return _data;
                 }     
                 public function set data(value:Object):void {
                     _data = value;
                     source = value.data ;    //此处要跟前面的列名称一致
                 }       
                 public function get listData():ListData {
                     return _listData;
                 }      
                 public function set listData(value:ListData):void {
                     _listData = value;
                     invalidate(InvalidationType.DATA);
                     invalidate(InvalidationType.STATE);
                 }     
                 public function get selected():Boolean {
                     return _selected;
                 }      
                 public function set selected(value:Boolean):void {
                     _selected = value;
                     invalidate(InvalidationType.STATE);
                 }   
                public function setMouseState(state:String):void {
                }
             }
         }
    
  • 相关阅读:
    LR11中自定义函数web_custom_request请求
    lr总结
    LR-事务
    LR参数和变量
    lr_save_searched_string函数的使用介绍
    python中判断变量的类型
    python中使用%与.format格式化文本
    应用图层的符号设置
    arcgis python 联合和合并
    arcgis python对于输出参数,获得ERROR 000840: 该值不是 要素类。
  • 原文地址:https://www.cnblogs.com/wqing/p/2388504.html
Copyright © 2011-2022 走看看