B2017-024 Added a context menu with windows clipboard options

This commit is contained in:
2017-02-13 19:24:52 +00:00
parent ac103b0f77
commit f933b59e5f
3 changed files with 85 additions and 13 deletions

View File

@@ -66,9 +66,10 @@ namespace VEPROMS
string mystr = tb.FontTable;
_DicStepRtb.Add(fld.name, tb);
tb.MyItemInfo = null; // pi as ItemInfo;
tb.FieldToEdit = E_FieldToEdit.PSI;
tb.FieldToEdit = E_FieldToEdit.Text;//E_FieldToEdit.PSI;
tb.BorderStyle = BorderStyle.FixedSingle;
tb.Enter += new System.EventHandler(this.FieldStepRTB_Enter);
tb.ContextMenuStrip = contextMenuStrip1; // B2017-024 clipboard context menu
// see if config has data for this field, i.e. search for the 'name'
string val = DoFolder ? folderConfig.GetValue("SI", fld.name) : dvConfig.GetValue("SI", fld.name);
DisplayText dt = new DisplayText(val, new VE_Font("Arial", 10, E_Style.None, 12), false);
@@ -193,5 +194,21 @@ namespace VEPROMS
DialogResult = DialogResult.Cancel;
this.Close();
}
// B2017-024 - added a clip board context menu
private void fwdCMCbCut_Click(object sender, EventArgs e)
{
SendKeys.Send("^x"); // <cltr><x>
}
private void fwdCMCbCopy_Click(object sender, EventArgs e)
{
SendKeys.Send("^c"); // <cltr><c>
}
private void fwdCMCbPaste_Click(object sender, EventArgs e)
{
SendKeys.Send("^v"); // <cltr><v>
}
}
}