DevStyle.SetTreeListSelectStyle 设置TreeList组件只读状态(用于选择)


  DevStyle.SetTreeListSelectStyle 设置TreeList组件只读状态(用于选择)贴图图片-treelistlookupedit




C# Code:


/// <summary>
/// TreeList组件只读,用于选择
/// </summary>
/// <param name="tree"></param>
public static void SetTreeListSelectStyle(TreeList tree)
{
  tree.Appearance.Empty.BackColor
= System.Drawing.Color.WhiteSmoke;
  tree.Appearance.Empty.Options.UseBackColor
= true;
  tree.Appearance.Row.BackColor
= System.Drawing.Color.WhiteSmoke;
  tree.Appearance.Row.Options.UseBackColor
= true;
  
//Appearance.HideSelectionRow
  
tree.Appearance.HideSelectionRow.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
  tree.Appearance.HideSelectionRow.ForeColor
= System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
  tree.Appearance.HideSelectionRow.Options.UseBackColor
= true;
  tree.Appearance.HideSelectionRow.Options.UseForeColor
= true;
  
//Appearance.SelectedRow
  
tree.Appearance.SelectedRow.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
  tree.Appearance.SelectedRow.ForeColor
= System.Drawing.Color.Red;
  tree.Appearance.SelectedRow.Options.UseBackColor
= true;
  tree.Appearance.SelectedRow.Options.UseForeColor
= true;
  
//Options
  
tree.OptionsBehavior.Editable = false;
  tree.OptionsSelection.EnableAppearanceFocusedCell
= false;
  tree.OptionsView.ShowHorzLines
= false;
  tree.OptionsView.ShowVertLines
= false;
  tree.TreeLineStyle
= DevExpress.XtraTreeList.LineStyle.Percent50;
  tree.OptionsView.ShowRoot
= true;
  tree.LookAndFeel.UseDefaultLookAndFeel
= false;
  tree.LookAndFeel.UseWindowsXPTheme
= true;
}

//来源:C/S框架网 | www.csframework.com | QQ:23404761




C/S框架网|原创精神.创造价值.打造精品

扫一扫加微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务

版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
C/S框架网
上一篇:C# DevExpress TreeListLookUpEdit 绑定数据源下拉窗体
下一篇:DevTreeListView.SetImageIndex 设置TreeList显示的图标
评论列表

发表评论

评论内容
昵称:
关联文章

DevStyle.SetTreeListSelectStyle 设置TreeList状态(用于选择)
DevExpress GridView在状态下如何隐藏表格的按钮EditorShowMode|ShowButtonMode
frmBaseDataForm增加SetControlEnable方法-设置容器内的控可用状态
无法升级数据库"CSFramework_WebAPITest",因为它是的,它具有文件,或是用户无权修改其中的某些文件
Winform 快速初始化Dev TreeList树控的数据
DevTreeListView.SetImageIndex 设置TreeList显示的图标
关于LookupEdit选择一条纪录不触发EditValueChanged事件
DevExpress XtraTabControl 添加一个TabPage并设置图标
[原创]递归读取DataTable加载TreeList
主窗体NavBar设置大小图标与模块对应
HTTP状态码大全-System.Net.HttpStatusCode
Dev表格RepositoryItemLookUpEdit改变值时设置其它列的值-原创
什么是COM,COM对象,COM标准?
C#.Net开发 - 使用Attach to Process实时调试设计器代码
NavBarControl 添加一个导航菜单(Add Group)
Winform软件开发框架使用DevExpress有那些优势?
【原创】C# Winform Dev自动下拉弹框筛选数据PopupContainerEdit
明细表使用ButtonEdit选择商品资料并设置商品名称,单价等信息
初始化DataProvider流程
关于NavBarControl点击ExpandButton缩放后不能控制Dock的问题