/[EmuXPortal]/trunk/EmuXPortal/GameControl.cs
ViewVC logotype

Diff of /trunk/EmuXPortal/GameControl.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/EmuXPortal/GameControl.cs	2012/04/04 02:13:41	21
+++ trunk/EmuXPortal/GameControl.cs	2012/04/04 02:39:20	22
@@ -11,11 +11,14 @@
 {
     public partial class GameControl : UserControl
     {
-        public GameControl()
-        {
-            InitializeComponent();
-        }
+        public GameControl() { InitializeComponent(); }
         public Image GameImage { get { return gameImage.Image; } set { gameImage.Image = value; } }
         public string GameName { get { return gameName.Text; } set { gameName.Text = value; } }
+        private void GameControl_Load(object sender, EventArgs e)
+        {
+            Graphics g = gameName.CreateGraphics();
+            Size size = g.MeasureString(gameName.Text, gameName.Font).ToSize();
+            gameName.Size = new Size(size.Width + 5, gameName.Size.Height);
+        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22