ComponentFactory / Krypton

Krypton WinForms components for .NET
BSD 3-Clause "New" or "Revised" License
1.88k stars 691 forks source link

KryptonTextBox Validate event is invoked twice #231

Open overlinejota opened 2 years ago

overlinejota commented 2 years ago

A simple form with a KrytonTextBox and a button. The next code wave twice when KryptoTextbox1 loses focus:

namespace AppForm{
    public partial class Form1 : Krypton.Toolkit.KryptonForm{
        public Form1() {
            InitializeComponent();
        }            
        private void kryptonTextBox1_Validated(object sender, EventArgs e) {
            MessageBox.Show("Error","Hello");
        }
    }
}

private void InitializeComponent() {
    ...
    this.kryptonTextBox1.Validated += new System.EventHandler(this.kryptonTextBox1_Validated);
    ...
}

Thanks;