Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coding the Mousewheel

Status
Not open for further replies.

FoxEgg

Programmer
Mar 24, 2002
749
AU
I cannot find many tek-tips on mousewheel use...

And the 'help' file isn't particularly

Code:
PROCEDURE Object.MouseWheel
LPARAMETERS nDirection, nShift, nXCoord, nYCoord

I have a Grid and highlighted a row.. but the wheel part of the mouse seems to do nothing...

Can I code it?


JF
 
What do you want to do? The event fires when you scroll the mouse wheel. You can put code to respond to that in the event method.

Tamar
 
Thanks Tamar

Well when the grid has focus and has a row highlighted... and I scroll down... then can get it to skips a row

ie
SKIP +1

Likewise up

SKIP -1

...

JF
 
FoxEgg

The value of nDirection in the .MouseWheel() event is 120 for a forward movement and -120 for a backward movement.

As Tamar suggests, you could put suitable code in the .MouseWheel() event itself - or pass the value of nDirection or alternatively, .T. or .F., to an object method containing suitable code.

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommander.com
PDFcommander.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top