WinForm------TreeList属性介绍

转载:

http://blog.csdn.net/fwj380891124/article/details/6888077

 

  treeList1.LookAndFeel.UseWindowsXPTheme = true;    //使用XP主题
  treeList1.LookAndFeel.UseDefaultLookAndFeel = false;

  treeList1.OptionsView.ShowColumns = false;       //隐藏列名

  treeList1.OptionsView.ShowColumns = false;       //显示展开按钮

treelist1.OptionView.ShowIndicator = false;    //隐藏最前面的行指示列

  treeList1.Appearance.FocusedCell.BackColor = Color.LightSteelBlue;    //焦点行颜色渐变
  treeList1.Appearance.FocusedCell.BackColor2 = Color.SteelBlue;

  treeList1.OptionsView.ShowHorzLines = false;     //隐藏行列边框
  treeList1.OptionsView.ShowVertLines = false;

  treeList1.OptionsView.FocusRectStyle = DevExpress.XtraTreeList.DrawFocusRectStyle.None;  //隐藏焦点行边框

 

另附:

修改节点文字

var node = treeList1.FocusedNode;
node["Name"] = "新名";

 

删除焦点节点

var node = treeList1.FocusedNode;
treeList1.DeleteNode(node);

 

posted @ 2016-08-11 14:37  玉天恒  阅读(779)  评论(0编辑  收藏  举报