Ejemplo n.º 1
0
        protected override void PaintCell(DevAge.Drawing.GraphicsCache graphics, CellContext cellContext, RectangleF drawRectangle)
        {
            Range cellRange = PositionToCellRange(cellContext.Position);

            if (cellRange.ColumnsCount == 1 && cellRange.RowsCount == 1)
            {
                base.PaintCell(graphics, cellContext, drawRectangle);
            }
            else //Row/Col Span > 1
            {
                //I draw the merged cell only if not already drawn otherwise drawing the same cell can cause some problem when using special drawing code (for example semi transparent background)
                if (mDrawnRange.Contains(cellRange) == false)
                {
                    Rectangle spanRect = RangeToRectangle(cellRange);
                    base.PaintCell(graphics, cellContext, spanRect);

                    mDrawnRange.Add(cellRange);
                }
            }
        }
Ejemplo n.º 2
0
        protected override void PaintCell(DevAge.Drawing.GraphicsCache graphics, CellContext cellContext, RectangleF drawRectangle)
        {
            Range cellRange = PositionToCellRange(cellContext.Position);

            if (cellRange.ColumnsCount == 1 && cellRange.RowsCount == 1)
            {
                base.PaintCell(graphics, cellContext, drawRectangle);
            }
            else //Row/Col Span > 1
            {
                // I draw the merged cell only if not already drawn otherwise
                // drawing the same cell can cause some problem when using
                // special drawing code (for example semi transparent background)
                if (mDrawnRange.Contains(cellRange) == false)
                {
                    //[email protected]: painting merged cell depends on scrolling technique
                    ScrollingStyle.PaintMergedCell(graphics, cellRange, cellContext);
                    mDrawnRange.Add(cellRange);
                }
            }
        }