blockly > Kommentare > CommentView > setText
Legt den aktuellen Text des Kommentars fest.
Unterschrift:
setText(text: string): void;
Parameter
Parameter |
Typ |
Beschreibung |
text |
String |
|
Gibt zurück:
voidm
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-09-12 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-09-12 (UTC)."],[[["The `setText` method updates the content of a comment within Blockly."],["It takes a single argument, a string representing the new text content for the comment."],["Calling `setText` with the desired string modifies the existing comment to display the new text."]]],["The `setText` method within the `CommentView` class sets the text content of a comment. It accepts a single parameter, `text`, which is a string. This method updates the comment's displayed text with the provided string. The method doesn't return any value. The core action is changing the comment's visible text using the input string.\n"]]