Forum > Other

Non-linear scrollbar scroll speed


Should you ever want to change the speed of scrolling a scrollbar during
a constant scroll this is ONE way to do it. I am not saying this is good
or bad technique. It is just some code for you to peruse .

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.ScrollBar1Scroll(Sender:TObject;ScrollCode:TScrollCode; var ScrollPos:Integer);begin  With(Sender as TScrollbar)Do LargeChange:= Round(LargeChange*1.06);  if Sc=ScEndscroll then (Sender as TScrollbar).LargeChange:=10;  end;


[0] Message Index

Go to full version