private void menuItemUndo_Click(object sender, System.EventArgs e) { if (textBoxEdit.CanUndo == true) { textBoxEdit.Undo(); textBoxEdit.ClearUndo(); } }
public override void DetachEditingControl() { DataGridView dataGridView = base.DataGridView; if ((dataGridView == null) || (dataGridView.EditingControl == null)) { throw new InvalidOperationException(); } TextBox editingControl = dataGridView.EditingControl as TextBox; if (editingControl != null) { editingControl.ClearUndo(); } this.EditingTextBox = null; base.DetachEditingControl(); }
public override void DetachEditingControl() { DataGridView dgv = this.DataGridView; if (dgv == null || dgv.EditingControl == null) { throw new InvalidOperationException(); } TextBox textBox = dgv.EditingControl as TextBox; if (textBox != null) { textBox.ClearUndo(); } this.EditingTextBox = null; base.DetachEditingControl(); }
/// <include file='doc\ToolStripTextBox.uex' path='docs/doc[@for="ToolStripTextBox.ClearUndo"]/*' /> public void ClearUndo() { TextBox.ClearUndo(); }