ScrollBar::SmallChange Property
Gets or sets the value to be added to or subtracted from the Value property when the scroll box is moved a small distance.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The assigned value is less than 0. |
When the user presses one of the arrow keys or clicks one of the scroll bar buttons, the Value property changes according to the value set in the SmallChange property.
User interface guidelines suggest that the SmallChange and LargeChange properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the SmallChange and LargeChange properties should be set relative to the size of the picture box, not to the size of the image.
The following example assumes that you have created a Form, added a PictureBox to the Form, and added a horizontal HScrollBar and a vertical VScrollBar to the PictureBox. This code example is part of a larger example provided for the ScrollBar class overview.
In this example, the SmallChange property is set relative to the size of the PictureBox.
You must add references to the System.Drawing and System.Windows.Forms namespaces to run this example.
Note |
|---|
For instructions about how to run this example in Visual Studio, see How to: Compile and Run a Complete Windows Forms Code Example Using Visual Studio. |
Available since 1.1
