This commit is contained in:
2011-03-01 16:34:27 +00:00
parent 9d2f4faa33
commit 089c50befa
4 changed files with 656 additions and 119 deletions

View File

@@ -235,7 +235,7 @@ namespace Volian.Controls.Library
AddFontTable(selectedRtfSB, FormatFont, FontIsFixed(FormatFont));
_RtfPrefix = selectedRtfSB.ToString();
}
return _RtfPrefix;
return _RtfPrefix;// +@"{\colortbl ;\red255\green0\blue0;}";
}
}
// August 5, 2009 - KBR & RHM:
@@ -1035,7 +1035,20 @@ namespace Volian.Controls.Library
{
return (int)(Math.Ceiling(f));
}
public void AdjustWidthForContent()
public int MaxTextWidth
{
get
{
int maxWidth = 0;
for (int i = 0; i < TextLength; i++)
{
int w = GetPositionFromCharIndex(i).X;
maxWidth = Math.Max(maxWidth, w);
}
return maxWidth+10; // add 10 to account for the last character
}
}
public void AdjustWidthForContent()
{
int widthNL = Ceiling(GetStringWidth("\n"));
int widthMax = 0;