加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex的Tree树在根结点之间画虚线

发布时间:2020-12-15 03:45:54 所属栏目:百科 来源:网络整理
导读:? 一般是不会在根结点之间画虚线的,如果你有多个根节点,而节点之间需要有虚线,这时候要自己画了,如下: if(tip != "none" currentNode.uniqueName.slice(0,2) != tip){g.lineStyle(0,0); var verticalDottedLine:BitmapData = createDottedLine(lineColo

?

一般是不会在根结点之间画虚线的,如果你有多个根节点,而节点之间需要有虚线,这时候要自己画了,如下:

				if(tip != "none" && currentNode.uniqueName.slice(0,2) != tip){
					g.lineStyle(0,0); 
					var verticalDottedLine:BitmapData = createDottedLine(lineColor,lineAlpha,1,true); 
					g.beginBitmapFill(verticalDottedLine); 
					g.drawRect(4,9,30); 
					g.endFill(); 
				}
				

同时要保证顺序,如下:

			if(treeList.length > 1){
				var temp:String = treeList.getItemAt(treeList.length-1).uniqueName.slice(0,2);
				com.fronware.vaccess.components.TreeItemLinesRenderer.tip = temp;
			}else{
				com.fronware.vaccess.components.TreeItemLinesRenderer.tip = "none";
			}

也就是说,要保证在最后一个显示的根节点下不画虚线,否则有多个时画的虚线会乱。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读