tangxu
2024-12-16 23fadc9cb0c09b665a1bbcef7eaf16f916045dc4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#region Imports
 
using System;
using System.Drawing;
using System.Windows.Forms;
 
#endregion
 
namespace DPumpHydr.WinFrmUI.RLT.Controls
{
    #region ForeverLabel
 
    public class ForeverLabel : Label
    {
        protected override void OnTextChanged(EventArgs e)
        {
            base.OnTextChanged(e);
            Invalidate();
        }
 
        public ForeverLabel()
        {
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            Font = new("Segoe UI", 8);
            ForeColor = Color.LightGray;
            BackColor = Color.Transparent;
            Text = Text;
        }
    }
 
    #endregion
}