void SetHotColumn(TreeListColumn col, bool ishot) { int scrolloffset = HScrollValue(); if (col != m_hotColumn) { if (m_hotColumn != null) { m_hotColumn.ishot = false; Rectangle r = m_hotColumn.CalculatedRect; r.X -= scrolloffset; Invalidate(r); } m_hotColumn = col; if (m_hotColumn != null) { m_hotColumn.ishot = ishot; Rectangle r = m_hotColumn.CalculatedRect; r.X -= scrolloffset; Invalidate(r); } } }
protected virtual Rectangle GetPlusMinusRectangle(Node node, TreeListColumn firstColumn, int visibleRowIndex) { if (node.HasChildren == false) { return(Rectangle.Empty); } int hScrollOffset = HScrollValue(); if (firstColumn.CalculatedRect.Right - hScrollOffset < RowHeaderWidth()) { return(Rectangle.Empty); } System.Diagnostics.Debug.Assert(firstColumn.VisibleIndex == 0); Rectangle glyphRect = firstColumn.CalculatedRect; glyphRect.X -= hScrollOffset; glyphRect.X += GetIndentSize(node); glyphRect.X += Columns.Options.LeftMargin; glyphRect.Width = 10; glyphRect.Y = VisibleRowToYPoint(visibleRowIndex); glyphRect.Height = RowOptions.ItemHeight; return(glyphRect); }