-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: KryptonTextBox Validate
/ Validating
/ KeyUp
events are invoked twice
#666
Comments
KMaskedTextbox is also affected. When set to false non of the events is triggered. This link could be helpful |
@Smurf-IV Is this linked to the fixes that were merged yesterday? |
Do not think so, Did not look at any impact in this area as I was in the Dock and ribbon projects |
Is this just missing the 'Focus()' call in the validate event? |
I have the same situation and I created a project to demonstrate |
This also affects other controls like It is because
This could take a while to fix, e.g. just "some" of the eents in the KDominUD: private void OnDomainUpDownTextChanged(object sender, EventArgs e) => OnTextChanged(e);
private void OnDomainUpDownScroll(object sender, ScrollEventArgs e) => OnScroll(e);
private void OnDomainUpDownSelectedItemChanged(object sender, EventArgs e) => OnSelectedItemChanged(e);
private void OnDomainUpDownGotFocus(object sender, EventArgs e)
{
UpdateStateAndPalettes();
PerformNeedPaint(true);
InvalidateChildren();
base.OnGotFocus(e);
}
private void OnDomainUpDownLostFocus(object sender, EventArgs e)
{
UpdateStateAndPalettes();
PerformNeedPaint(true);
InvalidateChildren();
// ReSharper disable RedundantBaseQualifier
base.OnLostFocus(e);
// ReSharper restore RedundantBaseQualifier
}
private void OnDomainUpDownKeyPress(object sender, KeyPressEventArgs e) => OnKeyPress(e);
private void OnDomainUpDownKeyUp(object sender, KeyEventArgs e) => OnKeyUp(e);
private void OnDomainUpDownKeyDown(object sender, KeyEventArgs e) => OnKeyDown(e);
private void OnDomainUpDownPreviewKeyDown(object sender, PreviewKeyDownEventArgs e) => OnPreviewKeyDown(e);
private void OnDomainUpDownValidated(object sender, EventArgs e) => OnValidated(e);
private void OnDomainUpDownValidating(object sender, CancelEventArgs e) => OnValidating(e); Q: Should the |
I was going round in circles for months trying to track down this bug! @Smurf-IV What happens if you "disable" Krypton's implementation & use the standard WinForms validation calls? |
It will work as expected.. |
Update: Darn it.. Keep going round in circles when trying to apply to all Krypton controls.. This bug is entrenched too deeply in some places, and I haven't even moved into Ribbons yet ! |
I'm going to focus on just this control, so that it can be validated by @overlinejota as soon as a fix is published. |
@Smurf-IV Ok, will broadcast a message out on Discord too |
Validate
/ Validating
/ KeyUp
events are invoked twice
- `KeyUp` - `Validating` - `Validated` #666
A simple form with a KrytonTextBox and a button.
The next code wave twice when KryptoTextbox1 loses focus:
Thanks;
The text was updated successfully, but these errors were encountered: