RATC()

DoScroll

DoScroll is a method to scroll a grid horizontally and vertically as the user would with the scrollbars. It was introduced with grids in VFP 3, so we were really surprised this method was not extended to forms when forms gained scrollbars in VFP 6.

Usage

grdGrid.DoScroll( nDirection )

Parameter

Value

Meaning

nDirection

0

Simulates a click on the scrollbar up arrow.

1

Simulates a click on the scrollbar down arrow.

2

Simulates a page-up click—clicking in the space above the thumb and below the scroll arrow.

3

Simulates a page-down click—clicking in the space below the thumb and above the scroll arrow.

4

Simulates a click on the left scrollbar arrow.

5

Simulates a click on the right scrollbar arrow.

6

Simulates a form-left click—clicking in the space to the left of the thumb and the right of the scroll arrow.

7

Simulates a form-right click—clicking in the space to the right of the thumb and the left of the scroll arrow.

Omitted or any other number

Ignored.


A useful alternative to including scrollbars on the grid itself, DoScroll can be used to cause the same effect without all the visual interference, or with an alternative user interface. The Scrolled event fires after DoScroll is called, and receives a parameter for direction matching that is set by this method.

Example

grdGrid.DoScroll(0)

See Also

Grid, Scrollbars, Scrolled


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net