This commit is contained in:
@@ -155,6 +155,8 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
public void InitializeBorder(VlnFlexGrid myFlexGrid, CellRange myRange)
|
||||
{
|
||||
if (myRange.r1 == 0 && myRange.c1 == 0 && myRange.r2 == 2 && myRange.c2 == 2)
|
||||
Console.WriteLine("here");
|
||||
_TopBorder = GridLinePattern.Unknown;
|
||||
_InsideHorizontalBorder = GridLinePattern.Unknown;
|
||||
_BottomBorder = GridLinePattern.Unknown;
|
||||
@@ -167,21 +169,21 @@ namespace Volian.Controls.Library
|
||||
CellRange cr = myFlexGrid.GetMergedRange(r, c);
|
||||
if (r == myRange.r1) // Top Border
|
||||
_TopBorder = CombinePattern(_TopBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r1, cr.c1]);
|
||||
if (r == myRange.r1 && c == myRange.c1) // Left Border
|
||||
if (c == myRange.c1) // Left Border
|
||||
_LeftBorder = CombinePattern(_LeftBorder, myFlexGrid.MyBorders.VerticalLines[cr.r1, cr.c1]);
|
||||
if (r == myRange.r2) // Bottom Border
|
||||
_BottomBorder = CombinePattern(_BottomBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r2+1, cr.c2]);
|
||||
if (r == myRange.r2 && c == myRange.c2) // Right Border
|
||||
if (c == myRange.c2) // Right Border
|
||||
_RightBorder = CombinePattern(_RightBorder, myFlexGrid.MyBorders.VerticalLines[cr.r2, cr.c2+1]);
|
||||
if (r == cr.r1 && c == cr.c1) // Look for inside lines
|
||||
{
|
||||
if (cr.r1 > myRange.r1 && cr.r1 < myRange.r2) // Inside Horizontal Top
|
||||
_InsideHorizontalBorder = CombinePattern(_InsideHorizontalBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r1, cr.c1]);
|
||||
if (cr.r2 > myRange.r1 && cr.r2 < myRange.r2) // Inside Horizontal Bottom
|
||||
if (cr.r2+1 > myRange.r1 && cr.r2 < myRange.r2) // Inside Horizontal Bottom
|
||||
_InsideHorizontalBorder = CombinePattern(_InsideHorizontalBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r2 +1, cr.c2]);
|
||||
if (cr.c1 > myRange.c1 && cr.c1 < myRange.c2) // Inside Vertical Left
|
||||
_InsideVerticalBorder = CombinePattern(_InsideVerticalBorder, myFlexGrid.MyBorders.VerticalLines[cr.r1, cr.c1]);
|
||||
if (cr.c2 > myRange.c1 && cr.c2 < myRange.c2) // Inside Vertical Right
|
||||
if (cr.c2+1 > myRange.c1 && cr.c2 < myRange.c2) // Inside Vertical Right
|
||||
_InsideVerticalBorder = CombinePattern(_InsideVerticalBorder, myFlexGrid.MyBorders.VerticalLines[cr.r2, cr.c2 + 1]);
|
||||
}
|
||||
c = cr.c2;//Skip to the end of the merged cells
|
||||
|
Reference in New Issue
Block a user