ScrollBars, Scrolled
The ScrollBars property determines whether an edit box, form or grid displays a scrollbar. The Scrolled event fires each time the user clicks either the horizontal or vertical scrollbars, or drags either scroll button (the "thumb") on the grid or form. It also fires when the DoScroll method is called programmatically. The Scrolled event applies only to grids and forms, not to edit boxes.
Usage |
oObject.ScrollBars = nScrollBar nScrollBars = oObject.ScrollBars |
Parameter |
Value |
Meaning |
nScrollBar |
0 |
None. |
1 |
Horizontal bars only—grids and forms. |
|
2 |
Vertical bars only. |
|
3 |
Both horizontal and vertical bars—grids and forms only. |
VFP 7 Service Pack 1 fixes a bug in the original release of VFP 7 (but not previous versions of VFP): Scrollbars on edit boxes didn't show in an EXE running under the runtime libraries. A patch to fix this was released almost immediately after VFP 7 was; Service Pack 1 includes this fix, so if you haven't already installed the patch, there's no need to do so once you have SP1. |
Usage |
object.Scrolled() Procedure object.Scrolled() LPARAMETERS [ nIndex, ] [ nWhichWay ] |
Parameter |
Value |
Meaning |
nIndex |
Integer |
The index into this control, if used as part of a control array. |
nWhichWay |
0 |
User clicked the up arrow button or dragged the thumb upward. |
1 |
User clicked the down arrow button or dragged the thumb downward. |
|
2 |
User clicked in the space above the thumb. |
|
3 |
User clicked in the space below the thumb. |
|
4 |
User clicked the left arrow button or dragged the thumb to the left. |
|
5 |
User clicked the right arrow or dragged the thumb to the right. |
|
6 |
User clicked in the space to the left of the thumb. |
|
7 |
User clicked in the space to the right of the thumb. |
Example |
ThisForm.grdGrid1.Scrolled() |
See Also |
ContinuousScroll, DoScroll, EditBox, Form, Grid, HScrollSmallChange, ScaleMode, SetViewPort, ViewPortHeight, ViewPortLeft, ViewPortTop, ViewPortWidth, VScrollSmallChange |