Stay organized with collections
Save and categorize content based on your preferences.
blockly > Scrollbar > (constructor)
Constructs a new instance of the Scrollbar
class
Signature:
constructor(workspace: WorkspaceSvg, horizontal: boolean, opt_pair?: boolean, opt_class?: string, opt_margin?: number);
Parameters
Parameter |
Type |
Description |
workspace |
WorkspaceSvg |
Workspace to bind the scrollbar to. |
horizontal |
boolean |
True if horizontal, false if vertical. |
opt_pair |
boolean |
(Optional) True if scrollbar is part of a horiz/vert pair. |
opt_class |
string |
(Optional) A class to be applied to this scrollbar. |
opt_margin |
number |
(Optional) The margin to apply to this scrollbar. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[],["The `Scrollbar` class constructor creates a new scrollbar instance. It requires a `WorkspaceSvg` to which the scrollbar will be bound, and a boolean indicating horizontal or vertical orientation. Optionally, it accepts a boolean for horizontal/vertical pairing, a class name for styling, and a numeric margin value. These parameters define the scrollbar's attachment, orientation, pairing status, visual style, and positioning offset.\n"]]