Class
zebkit.ui.ScrollPan
extends <zebkit.ui.Panel> |
<zebkit.ui> |
Scroll UI panel. The component is used to manage scrolling for a children UI component that occupies more space than it is available. The usage is very simple, just put an component you want to scroll horizontally or/and vertically in the scroll panel:
// scroll vertically and horizontally a large picture
var scrollPan = new zebkit.ui.ScrollPan(new zebkit.ui.ImagePan("largePicture.jpg"));
// scroll vertically a large picture
var scrollPan = new zebkit.ui.ScrollPan(new zebkit.ui.ImagePan("largePicture.jpg"),
"vertical");
// scroll horizontally a large picture
var scrollPan = new zebkit.ui.ScrollPan(new zebkit.ui.ImagePan("largePicture.jpg"),
"horizontal");
zebkit.ui.ScrollPan
([c], [scrolls], [autoHide]
)
Parameters:
-
[c]
<zebkit.ui.Panel>an UI component that has to be placed into scroll panel
-
[scrolls]
<String>a scroll bars that have to be shown. Use "vertical", "horizontal" or "both" string value to control scroll bars visibility. By default the value is "both"
-
[autoHide]
<Boolean>a boolean value that says if the scrollbars have to work in auto hide mode. Pass true to switch scrollbars in auto hide mode. By default the value is false
public | void | scrolled (psx, psy) |
public | void | scrollTo (sx, sy) |
public | void | scrollXTo (sx) |
public | void | scrollYTo (sy) |
public | void | setAutoHide (b) |
public
void
scrolled (psx, psy )
Scroll manager listener method that is called every time a target component has been scrolled Parameters:
|
public
void
scrollTo (sx, sy )
Scroll horizontally and vertically to the given positions Parameters:
|
public
void
scrollXTo (sx )
Scroll horizontally Parameters:
|
public
void
scrollYTo (sy )
Scroll vertically Parameters:
|
public
chainable
setAutoHide (b )
Set the given auto hide state. Parameters:
|











