แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > ContextMenu > setCurrentBlock
ตั้งค่าบล็อกที่เมนูตามบริบทแนบอยู่ในปัจจุบัน
ลายเซ็น:
export declare function setCurrentBlock(block: Block | null): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
บล็อก |
บล็อก | null |
บล็อกที่เมนูตามบริบทแนบอยู่ |
การคืนสินค้า:
โมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-06 UTC
[null,null,["อัปเดตล่าสุด 2024-11-06 UTC"],[[["The `ContextMenu.setCurrentBlock()` function associates a context menu with a specific block."],["It takes one argument: the block to attach the context menu to, which can be a `Block` object or `null`."],["Calling this function with a `Block` object makes the context menu appear when right-clicking that block."],["Providing `null` as the argument detaches the context menu from any block."]]],[]]