- 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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user