35 lines
759 B
C#
35 lines
759 B
C#
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<EventArgs> 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
|
|
}
|
|
}
|