Paste: dsf

Author: k
Mode: c#
Date: Sun, 17 Apr 2011 06:52:57
Plain Text |
updateWidth() ...


            var g = this.label1.CreateGraphics();
            int width = Program.MeasureDisplayStringWidth(g, this.label1.Text, this.label1.Font);
            this.label1.Width = width;

Annotation: ok

Author: k
Mode: factor
Date: Sun, 17 Apr 2011 06:55:05
Plain Text |
   static void updateWidth(this Label lb)
        {         
            var g = lb.CreateGraphics();
            int width = Program.MeasureDisplayStringWidth(g, lb.Text, lb.Font);
            lb.Width = width;
        }

New Annotation

Summary:
Author:
Mode:
Body: