Make enter correctly work with tab controls

pull/35/head
Miepee 4 years ago
parent 672a2acba6
commit 8f66290032

@ -153,6 +153,13 @@ public class CustomButton : Drawable
Invalidate(); Invalidate();
} }
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.KeyData == Keys.Enter && HasFocus)
OnClick(null);
}
/// <summary> /// <summary>
/// Event raised when the mouse is released over this control's bounding box. /// Event raised when the mouse is released over this control's bounding box.
/// </summary> /// </summary>

Loading…
Cancel
Save