* UITextBox: 修复了无水印文字时,光标有时不显示的问题

This commit is contained in:
Sunny 2022-09-05 14:23:16 +08:00
parent 7bf2f55173
commit e351e113ee
2 changed files with 6 additions and 0 deletions

View File

@ -77,6 +77,7 @@ namespace Sunny.UI
private void waterMarkContainer_Paint(object sender, PaintEventArgs e)
{
waterMarkContainer.Visible = Watermark.IsValid();
waterMarkContainer.Location = new Point(2, 0);
waterMarkContainer.Height = this.Height;
waterMarkContainer.Width = this.Width;
@ -158,9 +159,13 @@ namespace Sunny.UI
protected override void OnInvalidated(InvalidateEventArgs e)
{
base.OnInvalidated(e);
if (waterMarkContainer != null)
{
waterMarkContainer.Visible = Watermark.IsValid();
waterMarkContainer.Invalidate();
}
}
[Browsable(false), DefaultValue(false)]
public bool IsScaled { get; set; }

View File

@ -37,6 +37,7 @@
* 2022-06-23: V3.2.0
* 2022-07-17: V3.2.1 SelectionChanged事件
* 2022-07-28: V3.2.2 Click和DoubleClick事件的问题
* 2022-09-05: V3.2.3
******************************************************************************/
using System;