[Project_owners] Scrolling a horizontal scrollbox

Roman Mironenko roman_mir at hotmail.com
Thu Jun 2 18:50:36 EDT 2005

Well, I have filed it as a bug in bugzilla 
https://bugzilla.mozilla.org/show_bug.cgi?id=293186  about a month ago and 
since it is a real confirmed bug all we can do is wait until the core team 
fixes it.  Or help them fix it.


>I have a scrollbox [horizontal] populated with multiple label elements.
>I want to flow through it via script, i.e. scroll it at a given interval.
>JS looks like this:
>   Scroll : function()
>   {
>     var scrollbox = document.getElementById("ticker-bar").childNodes[1];
>     var scrollboxObj =
>     var x = {};
>     var y = {};
>     scrollboxObj.getPosition(x, y);
>     dump(y.value + "-" + x.value+"\n");
>     scrollboxObj.scrollTo(0,y.value+10)
>     setTimeout(this.setScrollInterval, 1000);
>   },
>I verified that the scrollbox element is being grabbed correctly, but
>nsIScrollBoxObject.getPosition is always returning {0, 0} on each 
>One thing to note is that the scrollbox is part of a XUL template which
>generates the labels.
>Any ideas, or alternative ways I could scroll such content?
>Brian King
>www.mozdev.org - free project hosting for the Mozilla community
>Project_owners mailing list
>Project_owners at mozdev.org

More information about the Project_owners mailing list