aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine/UI/ClassicLabel.cs
blob: 0b9d9c28bd1a91b362e69f610dfd779a1960a665 (plain) (blame)
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Histacom2.Engine.UI
{
    public class ClassicLabel : Control
    {
        public ClassicLabel()
        {

        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            var gfx = e.Graphics;
            gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;

            gfx.DrawString(Text, Font, new SolidBrush(ForeColor), 0, 0);
        }
    }
}