blockly > FieldCheckbox > getText
Methode "FieldCheckbox.getText()"
Rufen Sie den Text dieses Felds ab. Wird verwendet, wenn der Block minimiert ist.
Unterschrift:
getText(): string;
Gibt zurück:
String
Text, der den Wert dieses Feldes darstellt („true“ oder „false“).
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-08-22 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-08-22 (UTC)."],[[["`FieldCheckbox.getText()` retrieves the textual representation of the checkbox field's value."],["This method is primarily used when the block is in a collapsed state, providing a concise representation of the checkbox's checked/unchecked status."],["The returned text will be either 'true' or 'false', corresponding to the checkbox's state."]]],["The `FieldCheckbox.getText()` method retrieves the textual representation of a checkbox field's value. This method, utilized when a block is collapsed, returns a string indicating the checkbox's state. The returned string will be either 'true' if the checkbox is checked or 'false' if it is unchecked. The method's signature indicates that no parameters are taken.\n"]]