Returns the width in pixels the control needs for its contents.
| C# | int Width = object.PreferredWidth; |
| VB.NET | Width = object.PreferredWidth As Integer |
| C++ | long Width = object->PreferredWidth; long Width = object->GetPreferredWidth(); |
| C | HRESULT object->get_PreferredWidth(long* Width); |
object
Width
Returns the width in pixels the control needs for its contents.
The PreferredWidth property returns the width in pixels a date field control needs to show its current value with the check box and buttons. p The width depends on the font, the format, the culture and the DPI of the monitor (DPI). A field that sizes itself (AutoSize) adjusts its height only; its width is defined by the application.
See Also SftDate Object | Object Hierarchy