ScrollBar.MovedScroll

Syntax

MovedScroll: function (sender,args)

Parameters

sender. Event source.

args. Event information.

Description

The MovedScroll event occurs after moving slider along scrollbar.

Example

To execute the example, connect the links to PP.js library and the PP.css visual styles table. Create the ScrollBar component. Add a handler for the MovedScroll event:

<script type="text/javascript">
    var hScrollBar = new PP.Ui.ScrollBar({
        ParentNode: document.getElementById("scroll1")
    });
    hScrollBar.setSize(200, 16);
    hScrollBar.setDraggerSize(30);
    hScrollBar.updateSize();
    hScrollBar.MovedScroll.add(function (sender, args) {
        alert("Position: " + hScrollBar.getValue());
    });
</script>

After executing the example a scrollbar is placed to the HTML page. After the slider position is changed using scroll buttons or by dragging it, a message appears that informs the user on the current position of the slider on the scrollbar.

See also:

ScrollBar