realshyfox
Programmer
Is it posible to scroll the grid pressing the right button over it and drag down the cursor (without the need of the grid scrollbar)?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
PUBLIC cInitialnYCoord, TopDist, BottomDist, RSUp,RSDown
cInitialnYCoord = nYCoord
IF nButton = 1
IF nYCoord > cInitialnYCoord +18
this.DoScroll(0) && scroll up
ENDIF
IF nYCoord = cInitialnYCoord
RETURN
ENDIF
IF nYCoord < cInitialnYCoord -18
this.DoScroll(1) && scroll down
ENDIF
ENDIF
Mike said:Yes, I would think something like that would work.
But one very obvious improvement: get rid of the public variables. Instead, make them custom properties of your grid class. That's the whole point of custom properties: to make the control self-contained. If you use public properties, you introduce unnecessary dependencies. In particular, the whole thing will fail if you have more than one instance of the grid in your application.
Mike said:Also, just out of curiosity: why do you want to do this? Why is this better than having the user use the scroll wheel or the scrollbars? After all, that's what they would expect to do in other applications.