From ab9f118edb06826ed49c0b46bb1bce38d407e4f6 Mon Sep 17 00:00:00 2001 From: lempamo Date: Tue, 12 Sep 2017 09:51:26 -0400 Subject: various classic control things --- Histacom2.Engine/UI/ClassicLabel.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Histacom2.Engine/UI/ClassicLabel.cs (limited to 'Histacom2.Engine/UI/ClassicLabel.cs') diff --git a/Histacom2.Engine/UI/ClassicLabel.cs b/Histacom2.Engine/UI/ClassicLabel.cs new file mode 100644 index 0000000..0b9d9c2 --- /dev/null +++ b/Histacom2.Engine/UI/ClassicLabel.cs @@ -0,0 +1,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); + } + } +} -- cgit v1.2.3