LargeChange, SmallChange Properties

See AlsoDBMG3N                 Example1JNHGJ0>Low

Apply To

Horizontal scroll bar1JSJOS7, vertical scroll bar1JSJOS7.


         LargeChangedetermines the amount of change to the Value5OIC88B property in a scroll bar control when the user clicks the area between the scroll box and scroll arrow.

         SmallChangedetermines the amount of change to the Value property in a scroll bar control when the user clicks a scroll arrow.



[form.]{ hscrollbar|vscrollbar}.LargeChange[ = change ]

[form.]{ hscrollbar|vscrollbar}.SmallChange[ = change ]


For both properties, you can specify an integer between 1 and 32,767, inclusive.  By default, each property is set to 1.

The Windows environment automatically sets proportional scrolling increments for scroll bars on form windows, combo boxes, and list boxes based on the amount of data in the control.  For a scroll bar control, however, you must specify these increments.  Use LargeChange and SmallChange to set scrolling increments appropriate to how the scroll bar is being used.

Typically, you set LargeChange and SmallChange at design time.  You can also reset them in code at run time when the scrolling increment must change dynamically.


Note   You set the maximum and minimum ranges of a scroll bar control with the Max6GHZL6 and Min6GHZL6 properties.


Data Type


See Also


Change Event8DZUNR

Value Property5OIC88B


Programmer's Guide:

Chapter 3, "Creating and Using Controls"

LargeChange, SmallChange, Max, Min Properties Example

The example uses a scroll bar to move a picture box control across the form.  To try this example, paste the code into the Declarations section of a form that contains a small picture box and a horizontal scroll bar.  Then press F5 and click the scroll bar.

Sub Form_Load ()
  HScroll1.Max = 100               ' Set maximum value.
  HScroll1.LargeChange = 20        ' Cross in 5 clicks.
  HScroll1.SmallChange = 5         ' Cross in 20 clicks.
  Picture1.Left = 0                ' Start picture at left.
  Picture1.BackColor = QBColor(3)  ' Set color of picture box.
End Sub
Sub HScroll1_Change ()
  ' Move picture according to scroll bar.
  Picture1.Left = (HScroll1.Value / 100) * ScaleWidth
End Sub