XUL Programmer's Reference Manual
|
||||||||||||||||||||||||||||||||||
<scrollbox>
|
||||||||||||||||||||||||||||||||||
<scrollbox> is a special box widget that acts like a XUL viewer element with its in-line content. In other words, when the XUL content in a scrollbox is larger than the scrollbox itself, that content is either clipped, or the scrollbox can provide scrollbars for seeing all of that content. In either case, the size of the scrollbox and its content are independent of one another. In the following example, the scrollbox contains XUL widgets that get clipped when they are loaded in the browser: <scrollbox width="200" height="200"> <button width="150" value="bigbutton" /> <button width="150" value="otherbutton" /> </scrollbox> | ||||||||||||||||||||||||||||||||||
scrollByLine | ||||||||||||||||||||||||||||||||||
Description
The scrollByLine method allows you to programmatically scroll by the input number of lines.Syntax <scrollbar id="string" ScrollByLine(delta_lines) />
<scrollbar id="roll" ScrollByLines(5) />
Size of lines is based on the current font. |
||||||||||||||||||||||||||||||||||
scrollByIndex | ||||||||||||||||||||||||||||||||||
Description
The scrollByIndex method allows you to scroll based on the size of the children in the scrollbox.Syntax <scrollbar id="string" ScrollByIndex(delta_indexes) />
<scrollbar ScrollTo(-1) />
The paramater delta_indexes represents the number of times to scroll by the total size of the scrollbar children. In the example above, the method scrolls back one full "screen." |
||||||||||||||||||||||||||||||||||
scrollToLine | ||||||||||||||||||||||||||||||||||
Description
The scrollToLine method allows you to scroll to a particular lineSyntax <scrollbox scrollToLine(line) >
<scrollbox scrollToLine(45) >
None. |
||||||||||||||||||||||||||||||||||
getPosition | ||||||||||||||||||||||||||||||||||
Description
The getPosition method returns the scroll offset in pixels.Syntax pos = scrollbox.getPosition
<scrollbox>
None. |
||||||||||||||||||||||||||||||||||
Last updated: 1/11/01 Ian
Oeschger
|