UpDownBase.PreferredHeight Property

 

Gets the height of the spin box (also known as an up-down control).

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[<BrowsableAttribute(false)>]
member PreferredHeight : int with get

Property Value

Type: System.Int32

The height, in pixels, of the spin box.

The PreferredHeight property value is based on the PreferredHeight property of the text box portion of the control and is adjusted for the style of border.

The following code example uses the derived class NumericUpDown and sets some of its properties derived from UpDownBase. This code requires that you have a NumericUpDown control, two ComboBox controls, and three CheckBox controls created on a form. Label the ComboBox controls BorderStyle and TextAlign. Label the CheckBox controls InterceptArrowKeys, ReadOnly, and UpDownAlign. The code allows you to change the property values at run time and see how each affects the appearance and behavior of the spin box. Add the following items to the combo box labeled BorderStyle: None, Fixed3D, and FixedSingle. Add the following items to the combo box labeled TextAlign: Left, Right, and Center.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: