[WinForm][DevExpress]设置TreeListNode的背景色
时间:2014-06-29 06:19:30
收藏:0
阅读:1156
关键代码:
/// <summary> /// 设置节点背景色 /// 在NodeCellStyle事件中使用 /// </summary> /// <param name="tree">TreeList</param> /// <param name="e">GetCustomNodeCellStyleEventArgs</param> /// <param name="builderBackColorHandler">委托</param> public static void CustomNodeBackColor(this TreeList tree, GetCustomNodeCellStyleEventArgs e, Func<TreeListNode, Color> builderBackColorHandler) { TreeListNode _node = e.Node; e.Appearance.BackColor = builderBackColorHandler(_node); }
代码使用:
代码效果:
评论(0)