The ScrollPanel class is a Panel with automatic scroll bars.
For more information on the class features, see Panel and ScrollPanel.
Constructor Attributes | Constructor Name and Description |
---|---|
Osp.Ui.Controls.ScrollPanel(config)
Creates an instance of the Osp.Ui.Controls.ScrollPanel class.
|
Method Attributes | Method Name and Description |
---|---|
{Map}
getClientAreaBounds()
Gets the bounds of the client area.
|
|
{Number}
getScrollPosition()
Gets the vertical scroll position.
|
|
{void}
scrollToBottom()
Scrolls down to the bottom of the ScrollPanel control.
|
|
{void}
scrollToTop()
Scrolls up to the top of the ScrollPanel control.
|
|
{void}
setScrollPosition(position)
Sets the vertical scroll position.
|
Event Attributes | Event Name and Description |
---|---|
Fired when the scroll reaches to the top or bottom.
|
// Example 1: var scrollPanelObj = new Osp.Ui.Controls.ScrollPanel({bounds:{x:12, y:80, width:150, height:40}}); formObj.addControl(scrollPanelObj); // Example 2: var scrollPanelObj_grid = new Osp.Ui.Controls.ScrollPanel({bounds:{x:12, y:80, width:150, height:40},layout : gridLayout}); formObj.addControl(scrollPanelObj_grid);
var scrollPanelObj = new Osp.Ui.Controls.ScrollPanel({bounds:{x:20,y:20,width:100,height:100}}) formObj.addControl(scrollPanelObj); var map = scrollPanelObj.getClientAreaBounds();
var scrollPanelObj = new Osp.Ui.Controls.ScrollPanel({bounds:{x:20,y:20,width:100,height:100}}); formObj.addControl(scrollPanelObj); var position = scrollPanelObj.getScrollPosition();
var scrollPanelObj = new Osp.Ui.Controls.ScrollPanel({bounds:{x:20,y:20,width:100,height:100}}) formObj.addControl(scrollPanelObj); scrollPanelObj.scrollToBottom();
var scrollPanelObj = new Osp.Ui.Controls.ScrollPanel({bounds:{x:20,y:20,width:100,height:100}}) formObj.addControl(scrollPanelObj); scrollPanelObj.scrollToTop();
var scrollPanelObj = new Osp.Ui.Controls.ScrollPanel({bounds:{x:20,y:20,width:100,height:100}}) formObj.addControl(scrollPanelObj); scrollPanelObj.setScrollPosition(50);
Key | Value |
---|---|
source | The original ScrollPanel control |
type | The type of scrollEnd event Osp.Ui.Controls.ScrollEndEvent |