diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index a16aca45..80748ba1 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -1464,6 +1464,19 @@ namespace Volian.Controls.Library SetSelection(SelectionStart - 7, SelectionLength + 7); // Expand selection to include start //_AdjustingSelection = false; } + public string GetSelectionForClipBoard() + { + string selTxtRTF = SelectedRtf; + LinkLocation llstart = FindLinkLocation(); + if (llstart != null) + { + selTxtRTF = Rtf.Substring(llstart.StartRtf, llstart.EndRtf - llstart.StartRtf); + string lookfor = selTxtRTF.Substring(selTxtRTF.IndexOf(' ')); + return SelectedRtf.Replace(lookfor, @"\v " + selTxtRTF); + } + return (selTxtRTF); + } + private void DeleteBetweenBetweenLinks(string keychars) { @@ -2091,7 +2104,9 @@ namespace Volian.Controls.Library public int SelectionStart { get { return _SelectionStart; } - set { _SelectionStart = value; } + set { + _SelectionStart = value; + } } int _SelectionLength; public int SelectionLength @@ -2101,6 +2116,8 @@ namespace Volian.Controls.Library } public SelectionData(RichTextBox richTextBox) { + //Console.WriteLine("SelectionData SelectionStart {0}", richTextBox.SelectionStart); + //Volian.Base.Library.vlnStackTrace.ShowStack("SelectionData SelectionStart",this);//.ShowStackLocal("SelectionData SelectionStart", 3); _SelectionStart = richTextBox.SelectionStart; _SelectionLength = richTextBox.SelectionLength; }