blockly > ScrollbarPair > setY
Set the handle of the vertical scrollbar to be at a certain position in CSS pixels relative to its parents.
Signature:
setY(y: number): void;
Parameters
Parameter |
Type |
Description |
y |
number |
Vertical scroll value. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `ScrollbarPair.setY()` method positions the vertical scrollbar's handle at a specified vertical position (in CSS pixels) within its parent element."],["This method accepts a single parameter, `y`, which is a number representing the desired vertical scroll value."],["Calling `ScrollbarPair.setY()` does not return any value (void)."]]],["The `setY()` method, part of the `ScrollbarPair` class, adjusts the vertical scrollbar's handle position. It accepts one parameter, `y`, a number representing the desired vertical scroll value in CSS pixels. Executing this method repositions the scrollbar's handle relative to its parent element. The method does not return a value.\n"]]