Initialize BorderListBox based upon current DPI
Changed background for border selection Draw Background and Borders for empty cells Set the Borders druing Grid conversion
This commit is contained in:
@@ -660,10 +660,10 @@ namespace Volian.Controls.Library
|
||||
DisplayText dt = new DisplayText(gi.MyItemInfo, rtfText, true);
|
||||
rtfText = dt.StartText;
|
||||
}
|
||||
// it does, so draw background
|
||||
e.DrawCell(DrawCellFlags.Background);
|
||||
if (rtfText.StartsWith(@"{\rtf"))
|
||||
{
|
||||
// it does, so draw background
|
||||
e.DrawCell(DrawCellFlags.Background);
|
||||
|
||||
// draw the RTF text
|
||||
if (e.Bounds.Width > 0 && e.Bounds.Height > 0)
|
||||
@@ -683,23 +683,23 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
if (e.Style != null)
|
||||
{
|
||||
switch (e.Style.TextAlign)
|
||||
{
|
||||
case TextAlignEnum.CenterBottom:
|
||||
case TextAlignEnum.GeneralBottom:
|
||||
case TextAlignEnum.LeftBottom:
|
||||
case TextAlignEnum.RightBottom:
|
||||
hAdjust = hDiff;
|
||||
break;
|
||||
case TextAlignEnum.CenterCenter:
|
||||
case TextAlignEnum.GeneralCenter:
|
||||
case TextAlignEnum.LeftCenter:
|
||||
case TextAlignEnum.RightCenter:
|
||||
hAdjust = hDiff / 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (e.Style.TextAlign)
|
||||
{
|
||||
case TextAlignEnum.CenterBottom:
|
||||
case TextAlignEnum.GeneralBottom:
|
||||
case TextAlignEnum.LeftBottom:
|
||||
case TextAlignEnum.RightBottom:
|
||||
hAdjust = hDiff;
|
||||
break;
|
||||
case TextAlignEnum.CenterCenter:
|
||||
case TextAlignEnum.GeneralCenter:
|
||||
case TextAlignEnum.LeftCenter:
|
||||
case TextAlignEnum.RightCenter:
|
||||
hAdjust = hDiff / 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (IsRoTable)
|
||||
{
|
||||
@@ -710,19 +710,18 @@ namespace Volian.Controls.Library
|
||||
_rtf.ForeColor = e.Style.ForeColor;
|
||||
}
|
||||
_rtf.BackColor = e.Style.BackColor;
|
||||
_rtf.Render(e.Graphics, new Rectangle(e.Bounds.X+1,e.Bounds.Y + hAdjust,e.Bounds.Width-3,e.Bounds.Height));
|
||||
_rtf.Render(e.Graphics, new Rectangle(e.Bounds.X + 1, e.Bounds.Y + hAdjust, e.Bounds.Width - 3, e.Bounds.Height));
|
||||
//CellRange cr = GetCellRange(e.Row, e.Col);
|
||||
//Console.WriteLine("ownerDraw UserData [{0},{1}] = {2}", cr.r1, cr.c1, _rtf.ContentsRectangle.Height);
|
||||
//cr.UserData = _rtf.ContentsRectangle.Height;
|
||||
}
|
||||
|
||||
// and draw border last
|
||||
//e.DrawCell(DrawCellFlags.Border);
|
||||
// This can be used to draw more specific borders
|
||||
DrawCellBorder(e);
|
||||
// we're done with this cell
|
||||
e.Handled = true;
|
||||
}
|
||||
// and draw border last
|
||||
//e.DrawCell(DrawCellFlags.Border);
|
||||
// This can be used to draw more specific borders
|
||||
DrawCellBorder(e);
|
||||
// we're done with this cell
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3003,7 +3002,8 @@ namespace Volian.Controls.Library
|
||||
TrimMergedRangeCellText(cr);
|
||||
}
|
||||
}
|
||||
}
|
||||
MyBorders = new VlnBorders(GridLinePattern.Single, Rows.Count, Cols.Count);
|
||||
}
|
||||
|
||||
//private Regex _RemoveComments = new Regex(@"\\v .*?\\v0( |$)");
|
||||
|
||||
|
Reference in New Issue
Block a user