Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
blockly > ToolboxCategory > setSelected
Đặt danh mục hiện tại làm danh mục đã chọn.
Chữ ký:
setSelected(isSelected: boolean): void;
Thông số
Thông số |
Loại |
Mô tả |
isSelected |
boolean |
"True" nếu danh mục này được chọn, nếu không thì sai. |
Trường hợp trả lại hàng:
void
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-10-16 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-10-16 UTC."],[[["The `setSelected()` method is used to mark a ToolboxCategory as selected or unselected within a Blockly workspace."],["It accepts a boolean argument, `isSelected`, indicating the desired selection state (true for selected, false for unselected)."],["Calling this method visually highlights the category in the toolbox to indicate its active status to the user."]]],["The `setSelected` method within the `ToolboxCategory` class designates a category as selected or deselected. It accepts a boolean parameter, `isSelected`. When `isSelected` is set to `true`, the category becomes selected. Setting it to `false` deselects the category. This method's return type is void, meaning it doesn't return any value. The method modifies the selection status of the designated toolbox category.\n"]]