ui.Checkbox.setDisabled
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Określa, czy pole wyboru jest wyłączone.
Zwraca to pole wyboru.
Wykorzystanie | Zwroty |
---|
Checkbox.setDisabled(disabled) | ui.Checkbox |
Argument | Typ | Szczegóły |
---|
to: ui.checkbox | ui.Checkbox | Instancja ui.Checkbox. |
disabled | Wartość logiczna | Określa, czy pole wyboru jest wyłączone. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]