using System; using System.ComponentModel; using System.Windows.Forms; namespace DevComponents.Charts.Design { [ToolboxItem(false)] public partial class LabeledTextBoxX : UserControl { #region EscapeKeyPressed public event EventHandler EscapeKeyPressed; #endregion public LabeledTextBoxX() { InitializeComponent(); } #region tbValue_PreviewKeyDown private void tbValue_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if (e.KeyCode == Keys.Escape) { if (EscapeKeyPressed != null) EscapeKeyPressed(this, EventArgs.Empty); } } #endregion } }