您的位置:首页 > 其它

TreeList 选中节点时图标状态和背景色

2013-01-29 10:28 225 查看
this.treelArea.SelectImageList = imglCustom;
this.treelArea.OptionsView.ShowFocusedFrame;
this.treelArea.Appearance.FocusedCell.BackColor = System.Drawing.Color.LightSteelBlue;
this.treelArea.Appearance.FocusedCell.BackColor2 = System.Drawing.Color.SteelBlue;
this.treelArea.Appearance.FocusedCell.Options.UseBackColor = true;
this.treelArea.Appearance.FocusedCell.Options.UseTextOptions = true;
this.treelArea.Appearance.FocusedCell.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
private void treelArea_GetSelectImage(object sender, DevExpress.XtraTreeList.GetSelectImageEventArgs e)
{
e.NodeImageIndex = e.Node.Expanded ? 0 : e.Node.Nodes.Count > 0 ? 1 : 2;

if (e.FocusedNode)
{
e.NodeImageIndex += 3;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: