nsIScrollable
Last changed in Gecko 29.0 (Firefox 29.0 / Thunderbird 29.0 / SeaMonkey 2.26)long getCurScrollPos(in long scrollOrientation); Obsolete since Gecko 29.0 |
long getDefaultScrollbarPreferences(in long scrollOrientation); |
void getScrollbarVisibility(out boolean verticalVisible, out boolean horizontalVisible); |
void getScrollRange(in long scrollOrientation, out long minPos, out long maxPos); Obsolete since Gecko 29.0 |
void setCurScrollPos(in long scrollOrientation, in long curPos); Obsolete since Gecko 29.0 |
void setCurScrollPosEx(in long curHorizontalPos, in long curVerticalPos); Obsolete since Gecko 29.0 |
void setDefaultScrollbarPreferences(in long scrollOrientation, in long scrollbarPref); |
void setScrollRange(in long scrollOrientation, in long minPos, in long maxPos); Obsolete since Gecko 29.0 |
void setScrollRangeEx(in long minHorizontalPos, in long maxHorizontalPos, in long minVerticalPos, in long maxVerticalPos); Obsolete since Gecko 29.0 |
Scroll orientations a scrollbar can be in.
Constant | Value | Description |
ScrollOrientation_X | 1 |
Horizontal scrolling. When passing this in to a method you are requesting or setting data for the horizontal scrollbar. |
ScrollOrientation_Y | 2 |
Vertical scrolling. When passing this in to a method you are requesting or setting data for the vertical scrollbar. |
Visibility states of a scrollbar.
Constant | Value | Description |
Scrollbar_Auto | 1 |
Scrollbars visible only when needed. |
Scrollbar_Never | 2 |
Scrollbars never visible, even when scrolling is still possible. |
Scrollbar_Always | 3 | Scrollbars always visible, even when scrolling is not possible. |
long getCurScrollPos( in long scrollOrientation );
scrollOrientation
long getDefaultScrollbarPreferences( in long scrollOrientation );
scrollOrientation
An integer representing the state of the scrollbar.
void getScrollbarVisibility( out boolean verticalVisible, out boolean horizontalVisible );
verticalVisible
horizontalVisible
void getScrollRange( in long scrollOrientation, out long minPos, out long maxPos );
scrollOrientation
minPos
maxPos
void setCurScrollPos( in long scrollOrientation, in long curPos );
scrollOrientation
curPos
void setCurScrollPosEx( in long curHorizontalPos, in long curVerticalPos );
curHorizontalPos
curVerticalPos
void setDefaultScrollbarPreferences( in long scrollOrientation, in long scrollbarPref );
scrollOrientation
scrollbarPref
void setScrollRange( in long scrollOrientation, in long minPos, in long maxPos );
scrollOrientation
minPos
maxPos
void setScrollRangeEx( in long minHorizontalPos, in long maxHorizontalPos, in long minVerticalPos, in long maxVerticalPos );
minHorizontalPos
maxHorizontalPos
minVerticalPos
maxVerticalPos
var nsiScr = gBrowser.selectedBrowser.docShell.QueryInterface(Components.interfaces.nsIScrollable);
var v={};
var h={};
nsiScr.getScrollbarVisibility(v,h);
v.value //returns true if the vertical scrollbar is displayed
h.value //returns true if the horizontal scrollbar is displayed