TabSheet.scrollToPosInPx

Syntax

scrollToPosInPx (verPosInPx, horPosInPx, fireEvent);

Parameters

verPosInPx. Number of virtual pixels, to which you need to scroll the table vertically.

horPosInPx. Number of virtual pixels, to which you need to scroll the table horizontally.

fireEvent. Determines whether to fire the ScrollChanged event on method execution.

Description

The scrollToPosInPx method scrolls the table vertically and horizontally to a specified number of pixels.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Scroll table contents vertically by 100 virtual pixels and horizontally by 200 pixels:

tabSheet.ScrollChanged.add(function (sender, args) {
    console.log("X: " + args.HScrollPos + "; Y" + args.VScrollPos)
});
tabSheet.scrollToPosInPx(100, 200, true);

After executing the example the table is scrolled vertically by 100 pixels and horizontally by 200 pixels:

The TabSheet.ScrollChanged event is fired: the browser console shows horizontal and vertical positions of scrollbar slider:

X: 33; Y33

Seebsp;also:

TabSheet