[转] TreeList 当前节点图标和背景色设置

// 给TreeList加SelectImage
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; /// <summary>
/// Handles the GetSelectImage event of the treelArea control.
/// 设置SelectImage的状态,如果是选中的则换成另选中时应该显示的图标
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e"> instance containing the event data.</param>
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;
}
}
[转] TreeList 当前节点图标和背景色设置的更多相关文章
- Dev TreeList 添加节点图标问题
1. 在设计界面添加imageCollection控件,在属性页设置图标(可Load from disk,也可从Load from dev gallery) 2. TreeList控件有一个叫做Cus ...
- DELPHI TreeView 文件目录树和 设置节点图标 完整
DELPHI TreeView 文件目录树和 设置节点图标 下载地址 http://download.csdn.net/detail/teststudio/6448293 需要制作 ...
- TreeView设置节点图标
TreeView设置节点图标 没子节点的设置其图标为 0 有节点的设置其图标为 1 procedure TForm1.Button1Click(Sender: TObject);var i:Int ...
- WinForm------TreeList修改节点图标和按钮样式
转载: https://documentation.devexpress.com/#WindowsForms/DevExpressXtraTreeListTreeList_CustomDrawNode ...
- div 背景色设置_DIV背景颜色设置
DIV 背景色设置篇-div背景颜色设置篇 一.div标签内直接设置背景颜色 - TOP <div style="background:#000; color:#FFF&quo ...
- Android ListView的item背景色设置以及item点击无响应等相关问题
Android ListView的item背景色设置以及item点击无响应等相关问题 在Android开发中,listview控件是非常常用的控件,在大多数情况下,大家都会改掉listview的ite ...
- ztree删除某个节点下的全部子节点后,父节点图标还是文件夹
<script type="text/javascript"> //删除节点 zTree.removeNode(treeNode); //获取删除节点的父节点 var ...
- 关于POI 中单元格背景色设置(转)
关于POI 中单元格背景色设置(转) csdn 中找到了用Apache POI 实现单元格背景色的小例子 我用了JDK6 + POI 3.17 ,调试中报错 最终将 CellStyle.SOLID ...
- eclipse中的字体大小设置和背景色设置
1.字体大小设置 在basic下选择最后一个TextFont 护眼背景色设置 添加到自定义颜色后点确定 最后一步点apply
随机推荐
- LINUX下如何查看tomcat运行状态,判断其是否启动
1,查看Tomcat启动日志. ${catalina_home}\logs [root@iZ25b4ffkfaZ logs]# tail -f catalina.outSep 10, 2015 11: ...
- django如何用orm增加manytomany关系字段(自定义表名)
不自定义表名的,网上有现成的,但如果自定义之后,则要变通一下了. app_insert = App.objects.get(name=app_name) site_insert = Site.obje ...
- hdu 1755 A Number Puzzle
这题枚举k节省时间 ;}
- hdu 1812 Count the Tetris
高精度+polya原理可以搞定 思路: 设边长为n的正方形,c种颜色.旋转只有 0,90,180,270度三种旋法.旋0度,则置换的轮换数为n*n旋90度,n为偶数时,则置换的轮换数为n*n/4,n为 ...
- SaaS系列介绍之十四: SaaS软件开发分析
1 引言 真正的问题,不是电脑是否具备思考能力,而是人类是否具备这种能力 ________B.F.Skinner<计算机科学> SaaS模式不同于传 ...
- *[topcoder]PalindromicSubstringsDiv2
http://community.topcoder.com/stat?c=problem_statement&pm=12967 计算一个字符串里Palindrome的数量.我的DP方法需要n^ ...
- GuessNum
import java.util.Scanner;import java.util.Random;/***猜数字,使用随机一个0-100的数字,然后用户猜,猜中了就提示猜中了,*否则提示猜大了还是猜小 ...
- 百度地图API简单使用
百度地图API是由JavaScript语言编写的,在使用之前需要将API引用到页面中: 现在新版本的需要密钥,下面用的是旧版的 <script src="http://api.map ...
- 259. 3Sum Smaller
题目: Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 ...
- sqort函数用法总结
qsort包含在<stdlib.h>头文件中,此函数根据你给的比较条件进行快速排序,通过指针移动实现排序.排序之后的结果仍然放在原数组中.使用qsort函数必须自己写一个比较函数. 函数原 ...