void MyTreeList_PaintEx(object sender, TreeListPaintEventArgs e)
 {
     foreach (RowInfo rowInfo in ViewInfo.RowsInfo.Rows)
     {
         Rectangle bounds = rowInfo.Bounds;
         bounds.Width = 14;
         e.Cache.DrawString(Helper.GetIndexByNode(rowInfo.Node).ToString(), indexPaintAppearance.Font, indexPaintAppearance.ForeColor, bounds, indexPaintAppearance.GetStringFormat());
     }
 }
Example #2
0
 void OnPaintEx(object sender, TreeListPaintEventArgs e)
 {
     if (selectedRect == Rectangle.Empty)
     {
         return;
     }
     e.Cache.DrawRectangle(Pens.Blue, selectedRect);
     using (SolidBrush selectedBrush = new SolidBrush(Color.FromArgb(50, Color.Blue)))
         e.Cache.FillRectangle(selectedBrush, selectedRect);
 }