Class ch.component.scrollbar.ScrollPane

Description

Represents a ScrollPane.

A ScrollPane allows you to simply manage a resizable content that can be scrolled vertically and horizontally.

Method Index

new ScrollPane()
getHorizontalScrollBar(), getVerticalScrollBar(), refresh(), toString()

Constructor Detail

ScrollPane

public function ScrollPane(content:MovieClip, mask:MovieClip, setMaskDynamically:Boolean)

Creates a new ScrollPane object.

Parameters

contentThe content clip.
maskThe mask of the content.
setMaskDynamicallyDefines if the setMask method should be used (false by default).

Method Detail

getVerticalScrollBar

public function getVerticalScrollBar(Void):ScrollBar

Retrieves a vertical ScrollBar for this ContentPane.

Note that the ScrollBar object returned is always the same. It means that the following test will return true :

var a:ScrollBar = myContentPane.getVerticalScrollBar();
 var b:ScrollBar = myContentPane.getVerticalScrollBar();
 trace(a == b); //true
 

If this method is not called, the vertical ScrollBar won't be created.

Return

A ScrollBar object.

getHorizontalScrollBar

public function getHorizontalScrollBar(Void):ScrollBar

Retrieves an horizontal ScrollBar for this ContentPane.

Note that the ScrollBar object returned is always the same. It means that the following test will return true :

var a:ScrollBar = myContentPane.getHorizontalScrollBar();
 var b:ScrollBar = myContentPane.getHorizontalScrollBar();
 trace(a == b); //true
 

If this method is not called, the horizontal ScrollBar won't be created.

Return

A ScrollBar object.

refresh

public function refresh(source:Object, updateContent:Boolean):Void

Refresh the content of the ScrollPane.

This method should be called everytime a size update happened to the content clip.

Parameters

sourceThe source object that perform the refresh or null.
updateContentIndicates if the content must be moved when it is out of bounds (false by default).

toString

public function toString(Void):String

Represent the current instance into a String.

Return

A String representing the ScrollPane instance.