Blockly 于 2025 年 11 月 10 日移至 Raspberry Pi Foundation!请阅读博文和常见问题解答。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
blockly >滚动条 >(构造函数)
构造 Scrollbar 类的新实例
Signature:
constructor(workspace: WorkspaceSvg, horizontal: boolean, opt_pair?: boolean, opt_class?: string, opt_margin?: number);
参数
| 参数 |
类型 |
说明 |
| 工作区 |
WorkspaceSvg |
要将滚动条绑定到的工作区。 |
| 横向 |
布尔值 |
水平为 true,垂直为 false。 |
| opt_pair |
布尔值 |
(可选)如果滚动条是水平/垂直线对的一部分,则为 true。 |
| opt_class |
字符串 |
(可选)要应用于此滚动条的类。 |
| opt_margin |
number |
(可选)要应用于此滚动条的外边距。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],["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"]]