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

Diff of /trunk/EmuXPortal/PlatformControl.cs

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

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

 

  ViewVC Help
Powered by ViewVC 1.1.22