diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 625798a3..46280dba 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1395,18 +1395,21 @@ namespace Volian.Controls.Library TablePicker tpdlg = new TablePicker(); tpdlg.Location = pt; tpdlg.Left = left; - tpdlg.Show(); + DialogResult dr = tpdlg.ShowDialog(); while (tpdlg.Visible) { Application.DoEvents(); System.Threading.Thread.Sleep(0); } - if (!tpdlg.Cancel) + if (dr != DialogResult.Cancel) //!tpdlg.Cancel) { // Create a new grid to store the selected size grd = new VlnFlexGrid(); grd.Rows.Count = tpdlg.SelectedRows; grd.Cols.Count = tpdlg.SelectedColumns; + VE_Font vefont = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Table.Font; + Font GridFont = new Font(vefont.Family, (float)vefont.Size); + grd.Font = GridFont; } return grd; } diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index 7ab891f9..5c0f5155 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -581,7 +581,15 @@ namespace Volian.Controls.Library e.Style.BackColor = solid; // check whether the cell contains RTF - string rtfText = this.GetDataDisplay(e.Row, e.Col).Replace(@"\~",@"\u160?"); + // TODO: Can we do DisplayText() in here?? + //DisplayText(ItemInfo itemInfo, string text, bool colorLinks) + string rtfText = this.GetDataDisplay(e.Row, e.Col).Replace(@"\~", @"\u160?"); + GridItem gi = Parent as GridItem; + if (gi != null) + { + DisplayText dt = new DisplayText(gi.MyItemInfo, rtfText, true); + rtfText = dt.StartText; + } if (rtfText.StartsWith(@"{\rtf")) { // it does, so draw background @@ -2160,9 +2168,9 @@ namespace Volian.Controls.Library if (this[r, c] != null) { string strp = DisplayText.StaticStripRtfCommands((string)this[r, c]); - sb.Append(strp.Replace(@"\r\n", " ")); + sb.Append(strp.Replace("\r\n", " ")); } - sb.Append(@"\r\n"); + sb.Append("\r\n"); } c = c + 1; if (c == w)