DevExpress TreeList用法总结
http://blog.itpub.net/29251214/viewspace-774395/
http://blog.csdn.net/czp_huster/article/details/50184691
http://www.cnblogs.com/Lixinhua-GoOn/p/4046042.html
dev treelist控件,显示3角符,或显示+ -符的控制
解决方案1:
在 program.cs中把 下面一句暂时注解,你就会发现所有的 treelist会自动显示 + -号;
如果放出来,就显示3角符
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("DevExpress Style");
解决方案2:
自己画+-号
private void treeList1_CustomDrawNodeButton(object sender, DevExpress.XtraTreeList.CustomDrawNodeButtonEventArgs e)
{
Brush backBrush = new System.Drawing.Drawing2D.LinearGradientBrush(e.Bounds, Color.White, Color.Black,
em.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal);
e.Graphics.FillRectangle(backBrush, e.Bounds);
// painting 3D borders
ControlPaint.DrawBorder3D(e.Graphics, e.Bounds, Border3DStyle.Flat); // determining the character to display
string displayCharacter = e.Expanded ? "-" : "+";
// formatting the output character
StringFormat outCharacterFormat = new StringFormat();
outCharacterFormat.Alignment = StringAlignment.Center;
outCharacterFormat.LineAlignment = StringAlignment.Center; // painting the character
e.Graphics.DrawString(displayCharacter, new Font("Verdana", 8),
new SolidBrush(Color.White), e.Bounds, outCharacterFormat); // prohibiting default painting
e.Handled = true; }
DevExpress TreeList用法总结的更多相关文章
- Devexpress TreeList控件绑定显示父子节点对像
今天一位同事咨询Devexpress TreeList控件绑定自动显示父子节点对像,但结果是不会显示带父子节点关系,而是将所有的节点作为父节点显示出来了,对像类的代码如下 public class I ...
- 如何让DevExpress TreeList的每个结点高亮显示?
概述:如何让DevExpress TreeList的每个节点高亮显示? 如何让DXperience TreeList的每个节点高亮显示? 效果如下: private void treeList1_Cu ...
- How to easily create popup menu for DevExpress treelist z
http://www.itjungles.com/how-to-easily-create-popup-menu-for-devexpress-treelist.html Adding popup m ...
- DevExpress TreeList使用教程之绑定多级树
DevExpress TreeList使用教程之绑定多级树 概述:TreeList控件可以同时显示树结构和其他数据列,即在一个列上建立父子关系展开或收缩,同时还可以显示其他列的内容.在TreeLi ...
- DevExpress TreeList 全选和反选 z
/// <summary> /// 全选树 /// </summary> /// <param name="tree">树控件</para ...
- Devexpress treelist 树形控件 实现带三种状态的CheckBox
树形控件是使用频率很高的一种控件.对于属性控件往往需要下面两个功能 1.TreeList带有CheckBox,并且节点要有三种状态(所有的子节点都选中,所有的子节点都没选择,一部分子节点选中).使用 ...
- Devexpress TreeList选择父级联动
Treelist当显示复选框后,父级和子级的复选框没有关联,使用过程中很不便,如图所示 自己给treelist添加父子级联动 /// <summary> /// 初始化TreeList,父 ...
- TreeList用法(1)
本人按照网上搜的一些小用法整理的: 如果要出现左边的效果,代码如下: public DataTable CreateDataTable() { DataTable ...
- DevExpress TreeList 拖动时中如何判断源节点作为目标节点的子节点还是兄弟节点
目的:只允许同级拖动. 两个判断: 1.原节点(假设为:S)的父级如果不等于目标节点(假设为:T)的父节点,那么发生了跨级,即非同级移动.这个判断很容易. 2.S.T是同一级的,但是S是移动到T下一级 ...
随机推荐
- Native广告月入万刀的全部细节!
一步一步跑Native原生广告: 第一步:跑native前期的准备工作 第二步:阅读大神的Native文档(100多页,英文,建议找一个支持在线翻译功能的app来阅读) 第三步:阅读我的几十条经验总结 ...
- 「LG4178 Tree」
题目 我终于来抄点分治的板子了 随便说一点理解吧,点分治就是一种能求某种特定树上路径数量的算法 就是选择一个分治重心,统计一下以这个重心为\(LCA\)的路径的信息 之后对这个重心的子树再次分别选择分 ...
- 使用@Aspect切面进行让JDBC自动关闭(Spring AOP)
原生jdbc进行测试 demo:https://github.com/weibanggang/springjdbcAspect.git
- 关于readonly的一些说明
readonly在代码中只能在字段初始化器和构造函数中赋值,并不是说readonly只能赋值一次,超出这个范围以后readonly就不能通过代码修改了,但是还是可以用反射来修改,readonly仅仅是 ...
- Python 学习笔记(十二)Python文件和迭代(一)
文件 文件和文件夹 文件:文本文件.二进制文件 文件夹:(windows) G:\pythonWorkspace\python\study (linux/mac) /home/workspace/py ...
- Oracle 11g密码过期问题
Oracle 11g默认用户密码会在使用180天后过期,我们可以通过dba_users数据字典看一下用户的信息. SQL> select username,account_status,lock ...
- 学习笔记 - Manacher算法
Manacher算法 - 学习笔记 是从最近Codeforces的一场比赛了解到这个算法的~ 非常新奇,毕竟是第一次听说 \(O(n)\) 的回文串算法 我在 vjudge 上开了一个[练习],有兴趣 ...
- ABAP术语-BAPI ExplorerSupertype
Supertype 原文:http://www.cnblogs.com/qiangsheng/archive/2008/03/17/1109837.html Object type from whic ...
- CentOS7 使用chrony搭建集群中的时间同步服务
一.集群环境: 系统:CentOS7-minimal 集群中的两台主机ip:10.132.226.103/24 10.132.226.104/24 二.CentOS7中时间相关命令timedatec ...
- 浏览器端用JS实现创建和下载图片
问题场景 在前端很多的项目中,文件下载的需求很常见.尤其是通过JS生成文件内容,然后通过浏览器端执行下载的操作.如图片,Execl 等的导出功能.日前,项目中就遇到了这类需求,在浏览器端实现保存当前网 ...