Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
        protected virtual Rectangle GetPlusMinusRectangle(TLNode 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);
        }
Esempio n. 3
0
 protected virtual void PaintCell(Graphics dc, Rectangle cellRect, TLNode node, TreeListColumn column)
 {
     if (this.DesignMode)
     {
         CellPainter.PaintCell(dc, cellRect, node, column, GetFormatting(node, column), GetDataDesignMode(node, column));
     }
     else
     {
         CellPainter.PaintCell(dc, cellRect, node, column, GetFormatting(node, column), GetData(node, column));
     }
 }