public virtual void PaintCell(Graphics dc, Rectangle cellRect, TLNode node, TreeListColumn column, TreeList.TextFormatting format, object data) { if (format.BackColor != Color.Transparent) { Rectangle r = cellRect; r.X = column.CalculatedRect.X; r.Width = column.CalculatedRect.Width; using (SolidBrush brush = new SolidBrush(format.BackColor)) dc.FillRectangle(brush, r); } if (data != null) { cellRect = ColumnHeaderPainter.AdjustRectangle(cellRect, format.Padding); //dc.DrawRectangle(Pens.Black, cellRect); Color color = format.ForeColor; if (m_owner.FocusedNode == node && Application.RenderWithVisualStyles == false) { color = SystemColors.HighlightText; } TextFormatFlags flags = TextFormatFlags.EndEllipsis | TextFormatFlags.NoPrefix | format.GetFormattingFlags(); TextRenderer.DrawText(dc, data.ToString(), m_owner.Font, cellRect, color, flags); } }
public virtual void Draw(Graphics dc, ColumnHeaderPainter painter, Rectangle r) { painter.DrawHeader(dc, r, this, this.HeaderFormat, ishot); }