* UITextBox: 增加MouseClick,MouseDoubleClick事件

This commit is contained in:
Sunny 2022-11-16 21:28:20 +08:00
parent 50f105c4b0
commit 0a6ef3e4b4
2 changed files with 16 additions and 0 deletions

Binary file not shown.

View File

@ -43,6 +43,7 @@
* 2022-11-03: V3.2.6
* 2022-11-12: V3.2.8
* 2022-11-12: V3.2.8 MaximumEnabledMinimumEnabledHasMaximumHasMinimum属性
* 2022-11-26: V3.2.9 MouseClickMouseDoubleClick事件
******************************************************************************/
using System;
@ -100,6 +101,8 @@ namespace Sunny.UI
edit.MouseUp += Edit_MouseUp;
edit.MouseMove += Edit_MouseMove;
edit.SelectionChanged += Edit_SelectionChanged;
edit.MouseClick += Edit_MouseClick;
edit.MouseDoubleClick += Edit_MouseDoubleClick;
btn.Parent = this;
btn.Visible = false;
@ -131,6 +134,19 @@ namespace Sunny.UI
TextAlignmentChange += UITextBox_TextAlignmentChange;
}
public new event EventHandler MouseDoubleClick;
public new event EventHandler MouseClick;
private void Edit_MouseDoubleClick(object sender, MouseEventArgs e)
{
MouseDoubleClick?.Invoke(this, e);
}
private void Edit_MouseClick(object sender, MouseEventArgs e)
{
MouseClick?.Invoke(this, e);
}
private int scrollBarWidth = 0;
[DefaultValue(0), Category("SunnyUI"), Description("垂直滚动条宽度,最小为原生滚动条宽度")]