3.0.5

Vertical Scrollbar detection

Hello,

How could I verify if vertical scrollbar is present or not in the grid? The scrollbar is present when the height of all rows is greater than the height of screen. The scrollbar is not present when the height of all rows is less than the height of screen.

Is there any way just to look at the style object of scrollbar or any function call to look it up if the scrollbar is present or not?

Thanks,


Nick
June 8,
AW 1.0 does not have such event. You may try accessing the scrollbars element and compare offsetWidth with clientWidth, which should either be the same or differ by the width of the scrollbar ~20px.

var scrollbars = obj.getTemplate("layout").getContent("scrollbars");
var element = scrollbars.element();
element.offsetWidth - element.clientWidth > 10 ? ...
Alex (ActiveWidgets)
June 8,

This topic is archived.

See also:


Back to support forum