:: Forum >>
Mouse Wheel not working in version 2.0.1
I can't seem to get the mouse wheel to work at all in version 2.0.1 whenever the mouse is over the grid. I tried the following function, but it doesn't work in version 2.0.1:
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);
Any ideas?
Brian McCrary
Tuesday, November 21, 2006
*bump*
Brian McCrary
Tuesday, December 12, 2006
The mouse wheel should work with AW 2.0.1 by default, without any additional code, both in IE and FF. Are you saying that it doesn't work in your environment?
Alex (ActiveWidgets)
Tuesday, December 12, 2006
Alex,
Yes, it is not working in my environment. I am using I.E. 6.
Brian McCrary
Wednesday, December 13, 2006
Alex,
An update: the mouse wheel works whenever the grid itself has a scrollbar, but does not work whenever I have a grid that is larger than the screen itself, e.g. 500 rows.
Brian McCrary
Wednesday, December 13, 2006
*bump*
Tuesday, January 9, 2007
ok, as far as I understand you actually want to disable mouse wheel event handler in the grid -
obj.getScrollTemplate().setEvent(AW.ie ? "onmousewheel" : "onDOMMouseScroll", "");
Alex (ActiveWidgets)
Tuesday, January 9, 2007
um, no. i want it to work in the grid. see my last update on this from December 13th.
Wednesday, January 17, 2007
Sorry, I don't understand. You've said that the mouse wheel works whenever the grid has scrollbar and does not when it hasn't. But this is exactly how it should be? If there is no scrollbar there is nothing to scroll.
I thought that you want to scroll the page, not the grid (?).
Alex (ActiveWidgets)
Wednesday, January 17, 2007
Sorry for the confusion. Let me try to state it better:
I have a grid with 500 rows. This grid, of course, goes off my screen vertically. The grid itself does not have a vertical scrollbar (I made the height of the grid greater than the 500 rows tall), but the page that it is in does. Whenever my cursor is over the grid and I try to move the mouse wheel, nothing happens. It used to in version 1.x, but does not in version 2.01.
Now, if I take the same grid with 500 rows and make the height of that grid *smaller* than the height of 500 rows (i.e. the grid itself has a scrollbar), then the mouse wheel works just fine.
Brian McCrary
Wednesday, January 17, 2007
Version 1.x has a bug in mouse wheel processing - the event is not canceled and both grid and the parent page will scroll where possible. In v2 you have to disable mouse wheel event processing in the grid (to allow the event bubble into the parent page) and then the page will be able to scroll when mouse is above the grid.
Alex (ActiveWidgets)
Wednesday, January 17, 2007
Alex:
Thanks, it appears I was the one confused. :) That worked perfectly!
Brian McCrary
Wednesday, January 17, 2007
This topic is archived.
Back to support forum
Forum search