User Guide
ScrollPane component 671
Using skins with the ScrollPane component
The ScrollPane component uses an instance of RectBorder for its border and scroll bars for scroll
assets. For more information about skinning these visual elements, see “RectBorder class”
on page 647 and “Using skins with the UIScrollBar component” on page 831.
ScrollPane class
Inheritance MovieClip > UIObject class > UIComponent class > View > ScrollView >
ScrollPane
ActionScript Class Name mx.containers.ScrollPane
The properties of the ScrollPane class let you do the following at runtime: set the content,
monitor the loading progress, and adjust the scroll amount.
Setting a property of the ScrollPane class with ActionScript overrides the parameter of the same
name set in the Property inspector or Component inspector.
You can set up a scroll pane so that users can drag the content within the pane. To do this, set the
scrollDrag property to true; a pointing hand appears on the content. Unlike most other
components, events are broadcast when the mouse button is pressed and continue broadcasting
until the button is released. If the contents of a scroll pane have valid tab stops, you must set
scrollDrag to false; otherwise, each mouse interaction with the contents will invoke
scroll dragging.
Each component class has a
version property, which is a class property. Class properties are
available only on the class itself. The
version property returns a string that indicates the version
of the component. To access this property, use the following code:
trace(mx.containers.ScrollPane.version);
Note: The code trace(myScrollPaneInstance.version); returns undefined.
Method summary for the ScrollPane class
The following table lists methods of the ScrollPane class.
Method Description
ScrollPane.getBytesLoaded() Returns the number of bytes of content loaded.
ScrollPane.getBytesTotal() Returns the total number of bytes of content to be loaded.
ScrollPane.refreshPane() Reloads the contents of the scroll pane.