調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
blockly > FieldCheckbox
FieldCheckbox クラス
チェックボックス フィールドのクラス。
署名:
export declare class FieldCheckbox extends Field<CheckboxBool>
拡張: フィールド<CheckboxBool>
コンストラクタ
プロパティ
プロパティ |
修飾子 |
タイプ |
説明 |
CHECK_CHAR |
static
readonly
|
(宣言なし) |
チェックマークのデフォルトの文字。 |
SERIALIZABLE |
|
ブール値 |
シリアル化可能なフィールドはシリアルライザによって保存されますが、シリアル化不可能なフィールドは保存されません。編集可能なフィールドもシリアル化可能である必要があります。 |
value_ |
|
boolean | null |
注: デフォルト値は Field で設定されているため、ここでまたはコンストラクタで上書きするのではなく、その値を維持してください。 |
メソッド
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-05-16 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-05-16 UTC。"],[[["`FieldCheckbox` is a Blockly class used to create checkbox fields within blocks."],["It extends the base `Field` class and provides functionality specific to checkboxes, such as setting the check character and toggling the state."],["The value of a `FieldCheckbox` is either 'TRUE' or 'FALSE', representing the checked or unchecked state."],["Developers can customize the appearance and behavior of `FieldCheckbox` through properties like `CHECK_CHAR` and methods like `setCheckCharacter`."]]],["The `FieldCheckbox` class, extending `Field`, represents a checkbox. Key actions include: constructing a new checkbox instance, configuring it with options, and validating input as 'TRUE' or 'FALSE'. It updates the field's value and check element. Methods allow retrieving the text, boolean value, and setting the check mark character. It also manages display text, initializes the block UI, handles rendering, and toggles the checkbox state on clicks. Default check mark characters are defined.\n"]]