private void DrawBaseCell(Graphics GFX, int x, int y) { int nWidth = m_ParentRow.Parent.Columns[m_ColumnIndex].Width; int nHeight = m_ParentRow.Height; Brush BackColor = new SolidBrush(DetermineBackColor()); GFX.FillRectangle(BackColor, x, y, nWidth, nHeight); BackColor.Dispose(); if (m_ParentRow.Parent.Parent.ShowGridLines) { Pen Borders = new Pen(UtilityFunctions.AdjustBrightness(DetermineBackColor(), 0.75), 1); int bottom = y + nHeight - (int)Borders.Width; int right = x + nWidth - (int)Borders.Width; GFX.DrawLine(Borders, x, bottom, right, bottom); GFX.DrawLine(Borders, right, y, right, bottom); Borders.Dispose(); } }