Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

HScrollSmallChange, VScrollSmallChange

These two properties control how much a form scrolls each time you click on one of the arrow keys of a scrollbar.

Usage

frmForm.HScrollSmallChange = nHorizontalAmount
nHorizontalAmount = frmForm.HScrollSmallChange
frmForm.VScrollSmallChange = nVerticalAmount
nVerticalAmount = frmForm.VScrollSmallChange

Did you ever wonder how applications decided how much to scroll when you use the arrows on the scrollbars? Us neither, but now we know anyway.

The default for these properties is 10 pixels, but you can set it as high or low as you want. You can even change it dynamically. This seems most appropriate when the amount of information changes dramatically, or if you want to provide the feeling of acceleration on a really long form.

Note that only forms have these properties, even though edit boxes, grids and some other controls can have scrollbars, too. Sounds like control discrimination to us.

Example

ThisForm.HScrollSmallChange = 30

See Also

ContinuousScroll, Form, Scrollbars