Class Fox::FXScrollArea |
|
The scroll area widget manages a content area and a viewport area through which the content is viewed. When the content area becomes larger than the viewport area, scrollbars are placed to permit viewing of the entire content by scrolling the content. Depending on the mode, scrollbars may be displayed on an as-needed basis, always, or never. Normally, the scroll area’s size and the content’s size are independent; however, it is possible to disable scrolling in the horizontal (vertical) direction. In this case, the content width (height) will influence the width (height) of the scroll area widget. For content which is time-consuming to repaint, continuous scrolling may be turned off.
SCROLLERS_NORMAL: | Show the scrollbars when needed |
HSCROLLER_ALWAYS: | Always show horizontal scrollers |
HSCROLLER_NEVER: | Never show horizontal scrollers |
VSCROLLER_ALWAYS: | Always show vertical scrollers |
VSCROLLER_NEVER: | Never show vertical scrollers |
HSCROLLING_ON: | Horizontal scrolling turned on (default) |
HSCROLLING_OFF: | Horizontal scrolling turned off |
VSCROLLING_ON: | Vertical scrolling turned on (default) |
VSCROLLING_OFF: | Vertical scrolling turned off |
SCROLLERS_TRACK: | Scrollers track continuously for smooth scrolling |
SCROLLERS_DONT_TRACK: | Scrollers don’t track continuously |
Methods |
Attributes |
contentHeight | [R] | Content height, in pixels [Integer] |
contentWidth | [R] | Content width, in pixels [Integer] |
horizontalScrollbar | [R] | Horizontal scrollbar [FXScrollbar] |
scrollStyle | [RW] | Scroll style [Integer] |
verticalScrollbar | [R] | Vertical scrollbar [FXScrollbar] |
viewportHeight | [R] | Viewport height, in pixels [Integer] |
viewportWidth | [R] | Viewport width, in pixels [Integer] |
xPosition | [R] | Current x-position [Integer] |
yPosition | [R] | Current y-position [Integer] |
Public Class methods |
new(parent, opts=0, x=0, y=0, width=0, height=0) {|theScrollArea| ...} |
Constructor
Public Instance methods |
horizontalScrollable?() |
Return true if horizontally scrollable
verticalScrollable?() |
Return true if vertically scrollable
setPosition(x, y) |
Set the current position to (x, y)
position() |
Get the current position as an array [x, y]
moveContents(x, y) |
Move contents to the specified position