aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine/UI/ClassicLabel.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-09-23 17:25:22 +0100
committerAlex-TIMEHACK <[email protected]>2017-09-23 17:25:22 +0100
commit350e749bb9eab16efe753f9b8fd703b52a97f808 (patch)
tree9c90ec1a8148d66d9ff8605710a992e5e14a6b7e /Histacom2.Engine/UI/ClassicLabel.cs
parent84ef033af262343febc3f84471233e18bc6b502e (diff)
parent1ee3e00f8f0ee879fce4edf7d1ba9889335bc826 (diff)
downloadhistacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.gz
histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.bz2
histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.zip
Merge branch 'master' of https://github.com/Histacom2-Devs/Histacom2
Diffstat (limited to 'Histacom2.Engine/UI/ClassicLabel.cs')
-rw-r--r--Histacom2.Engine/UI/ClassicLabel.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/Histacom2.Engine/UI/ClassicLabel.cs b/Histacom2.Engine/UI/ClassicLabel.cs
new file mode 100644
index 0000000..f207eb1
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicLabel.cs
@@ -0,0 +1,31 @@
+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.Clear(BackColor);
+ gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
+
+ gfx.DrawString(Text, Font, new SolidBrush(ForeColor), ClientRectangle);
+ Height = (int)gfx.MeasureString(Text, Font, ClientRectangle.Width).Height;
+ }
+ }
+}