This commit is contained in:
John Jenko 2011-03-23 18:27:38 +00:00
parent 291e064de0
commit ccd1d65fce
2 changed files with 6 additions and 4 deletions

View File

@ -162,7 +162,7 @@ namespace Volian.Controls.Library
{
if (MyFlexGrid.Selection.c1 < 0 || MyFlexGrid.Selection.r1 < 0)
return;
if (MyFlexGrid.Selection.c1 >= MyFlexGrid.Cols.Count-1 || MyFlexGrid.Selection.r1 >= MyFlexGrid.Rows.Count-1)
if (MyFlexGrid.Selection.c1 >= MyFlexGrid.Cols.Count || MyFlexGrid.Selection.r1 >= MyFlexGrid.Rows.Count)
return;
if ((MyEditItem as GridItem).Initializing) return;
//C1.Win.C1FlexGrid.CellRange cr = MyFlexGrid.GetEvenSelection();
@ -1835,6 +1835,7 @@ namespace Volian.Controls.Library
if (MyFlexGrid.Cols.Fixed == 0) // allow change of size.
{
// set all the rows and columns to Fixed so that user can adjust the row/column size
if (MyFlexGrid.Cols[0].Width == -1) MyFlexGrid.Cols[0].Width = MyFlexGrid.Cols.DefaultSize;
MyFlexGrid.Cols.Fixed = MyFlexGrid.Cols.Count;
MyFlexGrid.Rows.Fixed = MyFlexGrid.Rows.Count;
ToggleTableDesignButtons(false);

View File

@ -779,8 +779,10 @@ namespace Volian.Controls.Library
int y1 = bounds.Top;
int x2 = bounds.Right - 1;
int y2 = bounds.Bottom - 1;
Console.WriteLine("{0},{1},{2},{3},{4},{5},{6}", e.Row, e.Col, (e.Style ?? Styles.Normal).Name, lineTop, lineLeft, lineBottom, lineRight);
//Console.WriteLine("{0},{1},{2},{3},{4},{5},{6}", e.Row, e.Col, (e.Style ?? Styles.Normal).Name, lineTop, lineLeft, lineBottom, lineRight);
Color bColor = Color.Blue; // Temporary - Set the border color to blue.
GridItem myGridItem = Parent as GridItem;
if (myGridItem == null) return;
if (row == 0 && lineTop != GridLinePattern.None)
{
Pen pn = VlnBorders.LinePen(lineTop, bColor);
@ -788,7 +790,6 @@ namespace Volian.Controls.Library
GridLinePattern lineTopRight = cr.c2 == Cols.Count - 1 ? GridLinePattern.None : MyBorders.HorizontalLines[cr.r1, cr.c2 + 1];
int dxTop = col == 0 ? (lineLeft == GridLinePattern.Double ? -3 :-1): 0;
int dx = col == 0 ? -1 : 0;
GridItem myGridItem = Parent as GridItem;
using (Graphics grParent = myGridItem.CreateGraphics())
{
if (lineTop == GridLinePattern.Double)// cr.r2 == 0)
@ -813,7 +814,7 @@ namespace Volian.Controls.Library
GridLinePattern lineLeftBelow = cr.r2 == Rows.Count - 1 ? GridLinePattern.None : MyBorders.VerticalLines[cr.r2 + 1, cr.c1];
int dyLeft = row == 0 ? (lineTop == GridLinePattern.Double ? -3:-1) : 0;
int dy = row == 0 ? -1 : 0;
GridItem myGridItem = Parent as GridItem;
//GridItem myGridItem = Parent as GridItem;
using (Graphics grParent = myGridItem.CreateGraphics())
{
if (lineLeft == GridLinePattern.Double)// cr.r2 == 0)