System.Windows.Forms
1.0.5000.0
2.0.0.0
System.Windows.Forms.ContainerControl
System.ComponentModel.Designer("System.Windows.Forms.Design.UpDownBaseDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")
System.Runtime.InteropServices.ComVisible(true)
System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)
A spin box consists of a text box and a small vertical scroll bar, commonly referred to as a spin button control. The class links the two controls and allows the user to change the display in the text box by clicking the up or down buttons or by entering the appropriate type of value directly into the text box. Use the spin box in cases where you want to limit the list of values a user can select, similar to a list box or combo box. Depending upon the type of list you want to display, the advantage to using a spin box is that it allows you to quickly set a range of valid values, rather than adding items one at a time. Implementing a spin box requires less data validation than a text box, as you can limit the data type when you derive a class from . An example of this is the class, which limits the values to the numeric type and uses a and property to validate the data.
To allow the user to use the arrow keys to change the contents of a spin box, set the property to true. To restrict the user to values you specify, set the property to true. To control the alignment of text in the spin box, set the property. To set the alignment of the up and down buttons in relation to the text box portion of the control, set the property to either or .
The and methods, when overridden, handle the clicking of the up or down buttons. When overridden, the and methods validate the value (either selected or entered) and update the text displayed in the spin box. If the value fails validation, use the method to select the text that is not valid. This allows the user to quickly correct the text by simply typing in a new value without having to manually select or delete the existing text.
Implements the basic functionality required by a spin box (also known as an up-down control).
Constructor
To be added.
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Boolean
To be added.
The control does not use the property.
Gets a value indicating whether the container will allow the user to scroll to any controls placed outside of its visible boundaries.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Drawing.Size
To be added.
The control does not use the property.
Gets or sets the size of the auto-scroll margin.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Drawing.Size
To be added.
The control does not use the property.
Gets or sets the minimum size of the auto-scroll area.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Visible)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.Boolean
To be added.
To be added.
Gets or sets a value indicating whether the control should automatically resize based on its contents.
Event
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the value of the property changes.
Property
System.Drawing.Color
To be added.
To be added.
Gets or sets the background color for the text box portion of the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Drawing.Image
To be added.
The property has no effect on the appearance of the control; therefore, it is hidden in the designer and from IntelliSense.
Gets or sets the background image for the .
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
To be added.
Occurs when the value of the property changes.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.ImageLayout
To be added.
The property has no effect on the appearance of the control; therefore, it is hidden in the designer and from IntelliSense.
Gets or sets the layout of the of the .
Event
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
To be added.
Occurs when the value of the property changes.
Property
System.Runtime.InteropServices.DispId(-504)
System.ComponentModel.DefaultValue(System.Windows.Forms.BorderStyle.Fixed3D)
System.Windows.Forms.BorderStyle
To be added.
You can use the property to create borderless and flat controls in addition to the default three-dimensional control.
Gets or sets the border style for the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.Boolean
To be added.
The property acts as a flag for the class. This property is used by derived classes to indicate when the class is changing the current property internally. If this property is set to false, the control requires that the user is changing the property and will set the property to true.
Gets or sets a value indicating whether the text property is being changed internally by its parent class.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.ContextMenu
To be added.
The preferred way to associate a shortcut menu with a tree node is with the property.
Gets or sets the shortcut menu associated with the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.Windows.Forms.ContextMenuStrip
To be added.
The shortcut menu appears when the user right-clicks the spin box.
Gets or sets the shortcut menu for the spin box (also known as an up-down control).
Property
System.Windows.Forms.CreateParams
To be added.
To be added.
Gets the required creation parameters when the control handle is created.
1.0.5000.0
2.0.0.0
Property
System.Drawing.Size
To be added.
To be added.
Gets the default size of the control.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Windows.Forms.ScrollableControl+DockPaddingEdges
To be added.
The control does not use the property.
Gets the dock padding settings for all edges of the control.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
When overridden in a derived class, handles the clicking of the down button on the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Boolean
To be added.
To be added.
Returns true if this control has focus.
1.0.5000.0
2.0.0.0
Property
System.Drawing.Color
To be added.
The property will change the color of the text in the textbox portion of the spin box.
Gets or sets the foreground color of the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.DefaultValue(true)
System.Boolean
To be added.
If the property is set to true and the spin box (also known as an up-down control) has focus, the user can use the UP ARROW and DOWN ARROW keys to select values.
Gets or sets a value indicating whether the user can use the UP ARROW and DOWN ARROW keys to select values.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.Drawing.Size
To be added.
Regardless of the specified value, the of the maximum size will always be 0.
Gets or sets the maximum size of the spin box (also known as an up-down control).
Property
2.0.0.0
System.Drawing.Size
To be added.
To be added.
Gets or sets the minimum size of the spin box (also known as an up-down control).
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
To be added.
Occurs when the mouse pointer enters the control.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
To be added.
Occurs when the mouse pointer rests on the control.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.EventHandler
To be added.
Occurs when the mouse pointer leaves the control.
1.0.5000.0
2.0.0.0
Event
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)
System.ComponentModel.Browsable(false)
System.Windows.Forms.MouseEventHandler
To be added.
Occurs when the user moves the mouse pointer over the control.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
When overridden in a derived class, raises the Changed event.
The source of the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
Method
2.0.0.0
System.Void
If a double-click occurs, the method will raise the event.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
Method
System.Void
If the spin box (also known as an up-down control) has focus when this event occurs, the direction the user scrolled the mouse wheel is determined, and either the or method is called.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
A that contains the event data.
Method
System.Void
If the property is set to true and the user presses the UP ARROW key, the method is called. Likewise, if the user presses the DOWN ARROW key, the method is called.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
The source of the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
The source of the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
This method validates the text in the text box portion of the control when the spin box (also known as an up-down control) loses focus.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
The source of the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
This method adjusts the size of the spin box (also known as an up-down control) when the text box portion of the control is resized.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
The source of the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
The source of the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Int32
To be added.
The property value is based on the property of the text box portion of the control and is adjusted for the style of border.
Gets the height of the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.DefaultValue(false)
System.Boolean
To be added.
By setting the property to true, you will eliminate the need for much validation of the property. The user will be restricted to the use of the up and down buttons to change the values. It will only allow them to select values you specify.
In the derived class , the behavior described is slightly different. When is set to true and a key is pressed, the control selects the first item in the collection where the first character matches the key pressed.
Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only.
1.0.5000.0
2.0.0.0
Method
System.Void
The method can be used when the spin box gets focus, or when the property fails data validation. When adding the validation code for the method in a derived class, call the method when validation fails.
Selects a range of text in the spin box (also known as an up-down control) specifying the starting position and number of characters to select.
The position of the first character to be selected.
The total number of characters to be selected.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
To be added.
To be added.
To be added.
To be added.
1.0.5000.0
Property
System.ComponentModel.Localizable(true)
System.String
To be added.
The method is called if the property is set while the property is set to true. The method is called if the property is set while the property is set to false.
Gets or sets the text displayed in the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue(System.Windows.Forms.HorizontalAlignment.Left)
System.Windows.Forms.HorizontalAlignment
To be added.
To be added.
Gets or sets the alignment of the text in the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
When overridden in a derived class, handles the clicking of the up button on the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
When overridden in a derived class, updates the text displayed in the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue(System.Windows.Forms.LeftRightAlignment.Right)
System.Windows.Forms.LeftRightAlignment
To be added.
To be added.
Gets or sets the alignment of the up and down buttons on the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Property
System.Boolean
To be added.
If the property is set while the property is set to true, the method is called. If the property is set while the property is set to false, the method is called.
Gets or sets a value indicating whether a value has been entered by the user.
1.0.5000.0
2.0.0.0
Method
System.Void
Some examples of validation include comparing the text entered to the data type set in your derived class, comparing the text to a list of values, or verifying the text to be within a range of values.
When overridden in a derived class, validates the text displayed in the spin box (also known as an up-down control).
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)