This commit is contained in:
2009-12-09 15:43:14 +00:00
parent 130c6e6aca
commit 111ff933be
3 changed files with 71 additions and 67 deletions

View File

@@ -166,7 +166,6 @@ namespace Volian.Controls.Library
{
_InitializingRTB = true;
_SelectedRtfSB.Remove(0, _SelectedRtfSB.Length);
DisplayText vlntxt = new DisplayText(_MyItemInfo, EpMode, VwMode, !edit, FieldToEdit);
//if (_origDisplayText != null && vlntxt.StartText == _origDisplayText.StartText)
//{
@@ -179,6 +178,7 @@ namespace Volian.Controls.Library
// Use Times New Roman for Debugging
//Font = new Font("Times New Roman", 14, FontStyle.Regular);
Font = _origDisplayText.TextFont.WindowsFont;
//Font = new Font("Times New Roman", _origDisplayText.TextFont.WindowsFont.Size, _origDisplayText.TextFont.WindowsFont.Style);
#elif(RELEASE)
Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
#else //DEMO
@@ -191,7 +191,7 @@ namespace Volian.Controls.Library
// was confusing the 'handle' of the rtf box.
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);
AddRtfText(vlntxt.StartText);
AddRtfStyles();
//AddRtfStyles();
// set readonly based on initial modes, however, these may change if
// user selected view mode.
ReadOnly = !(EpMode == E_EditPrintMode.Edit && VwMode == E_ViewMode.Edit);
@@ -721,10 +721,10 @@ namespace Volian.Controls.Library
if (SelectionLength > 0) DeleteCurrentSelection(null);
int position = SelectionStart;
SelectionLength = 0;
Console.WriteLine(this.Rtf);
//Console.WriteLine(this.Rtf);
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
SelectedRtf = @"{\rtf1\ansi"+FontTable+@"{\colortbl ;\red255\green0\blue0;}\v"+FontSize+@" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"\v0 \v [END>\v0 }";
Console.WriteLine(this.Rtf);
//Console.WriteLine(this.Rtf);
this.SelectionLength = 0;
this.SelectionStart = position;
FindAllLinks();