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用法总结的更多相关文章

  1. Devexpress TreeList控件绑定显示父子节点对像

    今天一位同事咨询Devexpress TreeList控件绑定自动显示父子节点对像,但结果是不会显示带父子节点关系,而是将所有的节点作为父节点显示出来了,对像类的代码如下 public class I ...

  2. 如何让DevExpress TreeList的每个结点高亮显示?

    概述:如何让DevExpress TreeList的每个节点高亮显示? 如何让DXperience TreeList的每个节点高亮显示? 效果如下: private void treeList1_Cu ...

  3. 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 ...

  4. DevExpress TreeList使用教程之绑定多级树

    DevExpress TreeList使用教程之绑定多级树   概述:TreeList控件可以同时显示树结构和其他数据列,即在一个列上建立父子关系展开或收缩,同时还可以显示其他列的内容.在TreeLi ...

  5. DevExpress TreeList 全选和反选 z

    /// <summary> /// 全选树 /// </summary> /// <param name="tree">树控件</para ...

  6. Devexpress treelist 树形控件 实现带三种状态的CheckBox

    树形控件是使用频率很高的一种控件.对于属性控件往往需要下面两个功能 1.TreeList带有CheckBox,并且节点要有三种状态(所有的子节点都选中,所有的子节点都没选择,一部分子节点选中).使用 ...

  7. Devexpress TreeList选择父级联动

    Treelist当显示复选框后,父级和子级的复选框没有关联,使用过程中很不便,如图所示 自己给treelist添加父子级联动 /// <summary> /// 初始化TreeList,父 ...

  8. TreeList用法(1)

    本人按照网上搜的一些小用法整理的: 如果要出现左边的效果,代码如下: public DataTable CreateDataTable()        {            DataTable ...

  9. DevExpress TreeList 拖动时中如何判断源节点作为目标节点的子节点还是兄弟节点

    目的:只允许同级拖动. 两个判断: 1.原节点(假设为:S)的父级如果不等于目标节点(假设为:T)的父节点,那么发生了跨级,即非同级移动.这个判断很容易. 2.S.T是同一级的,但是S是移动到T下一级 ...

随机推荐

  1. 双十一问题:kafka消费能力低下原因思考

    抛去cpu.内存等机器原因,在每个分区皆分配一个进程消费的情况下,利用扩机器来提高kafka消费速率已无能为力 此时发现,在实际洪峰时段的消费速率元达不到先前压测时的消费速率 原因思考: 1.洪峰时段 ...

  2. SAP Cloud for Customer里Sales Order和Sales Quote的建模方式

    SAP Cloud for Customer的Sales工作中心里有Sales Quote和Sales Order两个视图,一个用于销售报价单,另一个用于销售订单. 流程上是先有报价单 ,报价单是一份 ...

  3. PhoneGap 的文件 api

    一. 文件系统的请求 请求文件系统通过 window.requestFileSystem 来完函数声明如下: window.requestFileSystem(type, size, successC ...

  4. Django CreateView 简单使用

    django.views.generic中的CreateView类,是基于View的子类.CreateView可以简单快速的创建表对象. 下面记录小作代码. # polls/views.py from ...

  5. springmvc使用map接收form表单的参数

    其实只需要在map前面加上@RequestParam参数即可,jsp的name等都不变 public String queryByCondition(@RequestParam Map<Stri ...

  6. Pollard_rho 因数分解

    Int64以内Rabin-Miller强伪素数测试和Pollard 因数分解的算法实现 选取随机数\(a\) 随机数\(b\),检查\(gcd(a - b, n)\)是否大于1,若大于1则\(a - ...

  7. 「Newcoder练习赛40D」小A与最大子段和

    题目 挺好的一道题 我们考虑把\(i\)作为选取的最大子段的结束位置,我们如何往前计算贡献呢 考虑一下这个乘上其在队列中的位置可以表示为这个数被算了多少次,而我们往前扩展一位当前已经被扩展的就会被计算 ...

  8. Codeforces Round #533 (Div. 2) C. Ayoub and Lost Array 【dp】

    传送门:http://codeforces.com/contest/1105/problem/C C. Ayoub and Lost Array time limit per test 1 secon ...

  9. (第二场)D Money 【dp\贪心】

    题目:https://www.nowcoder.com/acm/contest/140/D 题目描述: White Cloud has built n stores numbered from 1 t ...

  10. Linux学习总结(八)-磁盘格式化,挂载,swap扩容

    上次我们学习了磁盘分区,磁盘分区完后还不能直接使用,需要对分区进行格式化,载入某个类型的文件系统,然后挂载到相应目录下才可使用. 一 磁盘格式化 格式化命令: mke2fs -t [ext2 ext3 ...