3.2.0

Mouse scroll wheel

Is there a way to enable the mouse wheel to scoll the grid?
December 10,
Should be possible in IE6. This is good excuse to buy a new mouse ;-)
Alex (ActiveWidgets)
December 10,
Currently it only works for me (XP/IE6) when the mouse cursor is over the scroll bar, it does not work when you mouse cursor is over the grid it self.

If there's any way to get it working in the grid too, i'd love to know it! ;-)
December 12,
The scrollbars belong to the separate DIV which is positioned below the data DIV. Probably you need to catch onmousewheel event on the data part and update scrollTop property?

var rows = obj.getTemplate("layout").getContent("data");
rows.setEvent("onmousemove", function(event){rows.element().scrollTop = event.y});

(replace onmousemove to onmousewheel ..)

sorry, still with old mouse...

Alex
Alex (ActiveWidgets)
December 13,
Because this javascript library is so cool, I will mail you a scroll mouse if you want, they are pretty inexpensive here. You may contact me -> enry@enry.net
Enry
January 5,
It would be enough just to put small picture of nice little mouse on your website with hyperlink here - and each time I look at the server log I will be reminded about onmousewheel event ...

;-)

Alex (ActiveWidgets)
January 5,
This sorta kinda works:

var rows = obj.getTemplate("layout").getContent("data");
rows.setEvent("onmousewheel", function(event){rows.element().scrollTop = event.y});

but doesn't actually scroll - -kinda jerky ... is this because it's scrolling to the top of the row and not the top of the layout area?

llamamon
January 8,
This should work better:

function onmousewheel(event){
var scrollbars = this.getTemplate("layout").getContent("scrollbars");
var delta = scrollbars.element().offsetHeight * event.wheelDelta/480;
scrollbars.element().scrollTop -= delta;
}
obj.setEvent("onmousewheel", onmousewheel);

(a new mouse, finally ;-)
Alex (ActiveWidgets)
January 8,
Wut!! Excellent. Thanks!
Enry
January 12,
Mousewheel scrolling is still broken in Firefox. The scrollbar moves, but the data doesn't.
Nate
August 5,

This topic is archived.

See also:


Back to support forum