From 111405d5ec0988613a9d349c6c56cfde494186d3 Mon Sep 17 00:00:00 2001 From: Roby Date: Tue, 29 Jun 2021 09:16:10 +0000 Subject: [PATCH] =?UTF-8?q?UCTextBoxEx=20=E5=A2=9E=E5=8A=A0=20KeyPress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HZH_Controls/Controls/Text/UCTextBoxEx.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/HZH_Controls/HZH_Controls/Controls/Text/UCTextBoxEx.cs b/HZH_Controls/HZH_Controls/Controls/Text/UCTextBoxEx.cs index 744bf31..cef8e13 100644 --- a/HZH_Controls/HZH_Controls/Controls/Text/UCTextBoxEx.cs +++ b/HZH_Controls/HZH_Controls/Controls/Text/UCTextBoxEx.cs @@ -1,4 +1,4 @@ -// *********************************************************************** +// *********************************************************************** // Assembly : HZH_Controls // Created : 08-08-2019 // @@ -387,6 +387,21 @@ namespace HZH_Controls.Controls if (isFocusColor) this.RectColor = Color.FromArgb(220, 220, 220); }; + + //Roby + txtInput.KeyPress += new KeyPressEventHandler(UCTextBoxEx_KeyPress); + } + + //Roby + public new event KeyPressEventHandler KeyPress = null; + + //Roby + private void UCTextBoxEx_KeyPress(object sender, KeyPressEventArgs e) + { + if (KeyPress != null) + { + KeyPress(null, e); + } } /// -- Gitee