1/// <summary>
2 /// TreeList 绘制NodeButton事件的处理程序
3 /// imglCustom是一个imagelist 有两个图标,如果当前节点是展开的则显示第一个图标,否则显示第二个图标
4 /// </summary>
5 /// <param name="sender"></param>
6 /// <param name="e"></param>
7 private void treeList1_CustomDrawNodeButton(object sender, DevExpress.XtraTreeList.CustomDrawNodeButtonEventArgs e)
8 {
9 e.Graphics.DrawImageUnscaled(imglCustom.Images[e.Expanded ? 0 : 1], e.Bounds);
10 e.Handled = true;
11 }
2 /// TreeList 绘制NodeButton事件的处理程序
3 /// imglCustom是一个imagelist 有两个图标,如果当前节点是展开的则显示第一个图标,否则显示第二个图标
4 /// </summary>
5 /// <param name="sender"></param>
6 /// <param name="e"></param>
7 private void treeList1_CustomDrawNodeButton(object sender, DevExpress.XtraTreeList.CustomDrawNodeButtonEventArgs e)
8 {
9 e.Graphics.DrawImageUnscaled(imglCustom.Images[e.Expanded ? 0 : 1], e.Bounds);
10 e.Handled = true;
11 }