代码之家  ›  专栏  ›  技术社区  ›  seismael

flex树节点类型

  •  1
  • seismael  · 技术社区  · 16 年前

    我有一个节点树,我不希望某些类型的节点出现在树中,我可以检查每个特定节点类型的树项目渲染器上的数据,所以我有一个类型,我不希望它显示为树节点,好像它不存在。

    if(this.data.type == TypeEnum.id){
                this.visible=false;
                this.height = 0;
            }
            else {
    
    1 回复  |  直到 16 年前
        1
  •  1
  •   Eugene    16 年前

    这样怎么样:

    public function init(e:Event):void{
       if(this.data.bad==true){
          this.visible=false;
          this.height=0;
          this.width=0;
       }
    }
    

    或者只是加一些 filter here