- Remove Comment

- Set Forecolor to backcolor on a cell being edited.
- Verify that the Col is within range before accessing cell contents
Support for volian border formats
This commit is contained in:
Rich
2011-02-09 15:31:57 +00:00
parent 24b023c2f7
commit 9befc92794
2 changed files with 27 additions and 9 deletions

View File

@@ -340,17 +340,30 @@ namespace Volian.Controls.Library
// and draw border last
e.DrawCell(DrawCellFlags.Border);
// This can be used to draw more specific borders
// DrawCellBorder(e.Graphics, e.Bounds,e.Row,e.Col);
// we're done with this cell
e.Handled = true;
}
}
private void DrawCellBorder(Graphics graphics, Rectangle rectangle, int row, int col)
{
int x1 = rectangle.Left;
int y1 = rectangle.Top;
int x2 = rectangle.Right - 1;
int y2 = rectangle.Bottom - 1;
if (row == 0)
graphics.DrawLine(Pens.Black, x1, y1, x2, y1);
if (col == 0)
graphics.DrawLine(Pens.Black, x1, y1, x1, y2);
graphics.DrawLine(Pens.Black, x1, y2, x2, y2);
graphics.DrawLine(Pens.Black, x2, y1, x2, y2);
// Double line attribute the Bottom of the first row
// if(row == 0)
// graphics.DrawLine(Pens.Black, x1, y2-2, x2, y2-2);
}
#endregion //Grid Initialize
#region Grid and Cell Styles
public void ChangeBackgroundColor(string bckgndColor)
{
CellRange cr = this.Selection;