Gets the width of the control (in pixels), assuming a single line of text is displayed.
[Visual Basic] Overridable Public ReadOnly Property PreferredWidth As Integer [C#] public int PreferredWidth {virtual get;} [C++] public: __property virtual int get_PreferredWidth(); [JScript] public function get PreferredWidth() : int;
The width of the control (in pixels), assuming a single line of text is displayed.
This property measures the length of the text string, but does not take line wrapping into consideration. For example, a text string that measures 300 pixels wide could be displayed as three lines in a Label that is only 100 pixels wide. PreferredWidth still returns 300 pixels.
Label Class | Label Members | System.WinForms Namespace | PreferredHeight