แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > แถบเลื่อน > ชุด
กำหนดตำแหน่งของแฮนเดิลแถบเลื่อน
ลายเซ็น:
set(value: number, updateMetrics?: boolean): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
value |
ตัวเลข |
ตำแหน่งของเนื้อหาซึ่งสัมพันธ์กับการดูในหน่วยพิกเซล |
updateMetrics |
boolean |
(ไม่บังคับ) เลือกว่าจะอัปเดตเมตริกในการเรียกใช้ชุดนี้หรือไม่ ค่าเริ่มต้นคือ true |
การคืนสินค้า:
เป็นโมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-12 UTC
[null,null,["อัปเดตล่าสุด 2024-09-12 UTC"],[[["The `Scrollbar.set()` method positions the scrollbar handle based on content displacement."],["It accepts a numeric `value` representing the content's pixel displacement relative to the view and an optional boolean `updateMetrics` to control metric updates, defaulting to true."],["Calling `Scrollbar.set()` does not return any value."]]],["The `Scrollbar.set()` method positions the scrollbar handle. It accepts two parameters: `value`, a numerical representation of the content's displacement in pixels, and an optional boolean `updateMetrics`, which defaults to true and determines if metrics should be updated. The method returns no value (`void`). The `value` parameter is required to indicate the new handle position.\n"]]