封鎖 >封鎖 >setCollapsed
Block.setoverrided() 方法
設定是否要收合區塊。
Signature:
setCollapsed(collapsed: boolean): void;
參數
參數 |
類型 |
說明 |
已收合 |
布林值 |
如果已收合,則為「true」。 |
傳回:
void
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[null,null,["上次更新時間:2024-08-22 (世界標準時間)。"],[[["The `setCollapsed()` method controls the visual state of a block, determining whether it appears collapsed or expanded."],["It accepts a single boolean parameter, `collapsed`, where `true` sets the block to a collapsed state and `false` to an expanded state."],["Calling this method affects the visual representation of the block within the Blockly workspace, providing a way to manage the display of potentially complex or lengthy block structures."]]],["The `Block.setCollapsed()` method determines if a block is collapsed. It accepts a boolean parameter, `collapsed`, where `true` indicates a collapsed state. The method's purpose is to set the block's visibility state accordingly. It doesn't return any value. The method takes `true` to collapse the block and it is a void method.\n"]]