ui.Checkbox.setDisabled
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Đặt xem hộp đánh dấu có bị vô hiệu hoá hay không.
Trả về hộp đánh dấu này.
Cách sử dụng | Giá trị trả về |
---|
Checkbox.setDisabled(disabled) | ui.Checkbox |
Đối số | Loại | Thông tin chi tiết |
---|
this: ui.checkbox | ui.Checkbox | Đối tượng ui.Checkbox. |
disabled | Boolean | Hộp đánh dấu có bị vô hiệu hoá hay không. |
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: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esetDisabled\u003c/code\u003e method allows you to enable or disable a checkbox element.\u003c/p\u003e\n"],["\u003cp\u003eThis method accepts a boolean value (\u003ccode\u003edisabled\u003c/code\u003e) indicating whether the checkbox should be disabled.\u003c/p\u003e\n"],["\u003cp\u003eCalling \u003ccode\u003esetDisabled\u003c/code\u003e returns the \u003ccode\u003eui.Checkbox\u003c/code\u003e instance, enabling method chaining.\u003c/p\u003e\n"]]],["The `Checkbox.setDisabled(disabled)` method sets the disabled state of a checkbox. It accepts a boolean argument, `disabled`, which determines if the checkbox is enabled or disabled. The method modifies the `ui.Checkbox` instance it's called on and returns the same `ui.Checkbox` instance. The `this` keyword in this method refers to the `ui.Checkbox` instance.\n"],null,["# ui.Checkbox.setDisabled\n\n\u003cbr /\u003e\n\nSets whether the checkbox is disabled.\n\n\u003cbr /\u003e\n\nReturns this checkbox.\n\n| Usage | Returns |\n|----------------------------------|-------------|\n| Checkbox.setDisabled`(disabled)` | ui.Checkbox |\n\n| Argument | Type | Details |\n|---------------------|-------------|-----------------------------------|\n| this: `ui.checkbox` | ui.Checkbox | The ui.Checkbox instance. |\n| `disabled` | Boolean | Whether the checkbox is disabled. |"]]