Gets or sets the value to be added or subtracted to the Value property when the <span id="frameworks:scroll_box" class ="gp">scroll box</span> is moved a small distance.
[Visual Basic] Public Property SmallChange As Integer [C#] public int SmallChange {get; set;} [C++] public: __property int get_SmallChange(); public: __property void set_SmallChange(int); [JScript] public function get SmallChange() : int; public function set SmallChange(int);
A numeric value. The default value is 1.
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.
The following example uses the derived class, VScrollBar and sets some of its common properties. This code assumes that a VScrollBar has been instantiated on a form.
[Visual Basic]
Private Sub MySub() ' Set the Minimum & Maximum properties. VScrollBar1.Minimum = 0 ' Set the maximum property equal to the height of the scroll bar. VScrollBar1.Maximum = VScrollBar1.Height ' Set the starting value (middle of the scroll bar). VScrollBar.Value = VScrollBar1.Maximum / 2 ' Set the SmallChange & LargeChange properties to a percentage of the Maximum property. VScrollBar1.SmallChange = VScrollBar1.Maximum / 25 VScrollBar1.LargeChange = VScrollBar1.Maximum / 10 End Sub
ScrollBar Class | ScrollBar Members | System.WinForms Namespace | LargeChange