B2017-231 force the list of correct words to appear when doing a right mouse click on a misspelled word.

This commit is contained in:
John Jenko 2017-11-13 14:10:01 +00:00
parent 9419f7d830
commit dd266d9d6c

View File

@ -280,8 +280,9 @@ namespace Volian.Controls.Library
font = new Font(value, 10, FontStyle.Italic); font = new Font(value, 10, FontStyle.Italic);
using (StepRTB srtb = new StepRTB()) using (StepRTB srtb = new StepRTB())
{ {
if (srtb.FontIsFixed(font)) MySymbolFontName = "FreeMono"; // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing if (srtb.FontIsFixed(font)) MySymbolFontName = "FreeMono"; // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
else MySymbolFontName = "Arial Unicode MS"; //else MySymbolFontName = Volian.Base.Library.vlnFont.ProportionalSymbolFont; // "FreeSerif";
else MySymbolFontName = "Arial Unicode MS";
} }
} }
else else
@ -927,6 +928,19 @@ namespace Volian.Controls.Library
HandleSelectionChange(); HandleSelectionChange();
// save our context menu to add to the spell checker's context menu // save our context menu to add to the spell checker's context menu
ThisContextMenuStrip = this.ContextMenuStrip; ThisContextMenuStrip = this.ContextMenuStrip;
// B2017-231 force the right mouse click to bring up word list if on a mis-spelled word
if (e.Button == System.Windows.Forms.MouseButtons.Right && Parent is RTBItem) // right mouse click and we are not on a table cell
{
if (ThisContextMenuStrip != null)
{
(Parent as RTBItem).MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ClearContextMenu();
this.ContextMenuStrip.Show(this, e.X, e.Y);
}
else
{
(Parent as RTBItem).MyStepPanel.MyStepTabPanel.MyStepTabRibbon.OpenContextMenu(this.PointToScreen(e.Location), this);
}
}
} }
} }
#endregion #endregion
@ -1235,9 +1249,10 @@ namespace Volian.Controls.Library
sbend.Insert(0, @"\i0"); sbend.Insert(0, @"\i0");
} }
selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}"; selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
if (!isFixed) if (!isFixed)
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 Arial Unicode MS;}}{\colortbl ;\red255\green0\blue0;}"); //selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}");
else selectedRtfSB.Append(@"{\f1\fnil\fcharset0 Arial Unicode MS;}}{\colortbl ;\red255\green0\blue0;}");
else
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
selectedRtfSB.Append("\r\n"); selectedRtfSB.Append("\r\n");
// use styles to construct rtf commands to insert into next line (where \b, etc is) // use styles to construct rtf commands to insert into next line (where \b, etc is)
@ -1314,9 +1329,10 @@ namespace Volian.Controls.Library
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append(@"{\fonttbl{\f0\fnil\fcharset2 " + this.Font.FontFamily.Name + @";}"); sb.Append(@"{\fonttbl{\f0\fnil\fcharset2 " + this.Font.FontFamily.Name + @";}");
if (!FontIsFixed(this.Font)) if (!FontIsFixed(this.Font))
sb.Append(@"{\f1\fnil\fcharset0 Arial Unicode MS;}}"); //sb.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}");
else sb.Append(@"{\f1\fnil\fcharset0 Arial Unicode MS;}}");
else
sb.Append(@"{\f1\fnil\fcharset0 FreeMono;}}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing sb.Append(@"{\f1\fnil\fcharset0 FreeMono;}}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
return sb.ToString(); return sb.ToString();
} }