zoukankan      html  css  js  c++  java
  • 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">The <see cref="DevExpress.XtraTreeList.GetSelectImageEventArgs"/> 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;
              }

          }

  • 相关阅读:
    ZedGrapy使用实例
    C#分割字符串(包括使用字符串分割)
    从VS2005项目转换为VS2008项目(C#版)
    关于SQL操作的一些经验
    android socket 编程总结
    Excel绘制人口金字塔图
    使用命令让IE全屏显示指定的页面,适用于触摸屏终端机
    毕业这两年
    使用XML数据结合XSLT导出Excel
    XSLT实现XML作为数据源在web页面显示人口金字塔统计图
  • 原文地址:https://www.cnblogs.com/guozhe/p/2880973.html
Copyright © 2011-2022 走看看