冰点出发
让软件部分加入代码就好
娟子
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 private void treeList1_CustomDrawNodeCell(object sender, DevExpress.XtraTreeList.CustomDrawNodeCellEventArgs e) { TreeList node = sender as TreeList; if(e.Node == node.FocusedNode) { e.Graphics.FillRectangle(SystemBrushes.Window, e.Bounds); Rectangler = new Rectangle(e.EditViewInfo.ContentRect.Left, e.EditViewInfo.ContentRect.Top, Convert.ToInt32(e.Graphics.MeasureString(e.CellText,treeList1.Font).Width + 1), Convert.ToInt32(e.Graphics.MeasureString(e.CellText,treeList1.Font).Height)); e.Graphics.FillRectangle(SystemBrushes.Highlight, r); e.Graphics.DrawString(e.CellText, treeList1.Font, SystemBrushes.HighlightText, r); e.Handled = true; } }