In This Topic
Scrolls the sheet by specified pixels. When vPixels is positive, worksheet will scroll down; when vPixels is negative, worksheet will scroll up; when vPixels is 0, worksheet won't scroll in vertical direction. When hPixels is positive, worksheet will scroll right; when hPixels is negative, worksheet will scroll left; when hPixels is 0, worksheet won't scroll in horizontal direction. When Workbook's option scrollByPixel is true, worksheet will scroll to new top row/left column index and new top row/left column offset; When Workbook's option scrollByPixel is false, worksheet will scroll to new top row/left column index, and new top row/left column offset will be always 0.
Syntax
var instance = new GC.Spread.Sheets.Worksheet(name);
var value; // Type: any
value = instance.scroll(vPixels, hPixels);
function scroll(
: number,
: number
) : any;
Parameters
- vPixels
- The pixels to scroll in vertical direction.
- hPixels
- The pixels to scroll in horizontal direction.
Example
//This example scrolls down the sheet 10 pixels and scrolls right the sheet 5 pixels.
activeSheet.scroll(10, 5);
See Also