コード例 #1
0
ファイル: TreeListView.cs プロジェクト: xuanximoming/PIC
        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);
                }
            }
        }
コード例 #2
0
ファイル: TreeListView.cs プロジェクト: xuanximoming/PIC
        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);
        }
コード例 #3
0
ファイル: TreeListView.cs プロジェクト: xuanximoming/PIC
 protected virtual TreeList.TextFormatting GetFormatting(Node node, TreeListColumn column)
 {
     return(column.CellFormat);
 }