blockly > FieldLabel > setClass
Methode "FieldLabel.setClass()"
Legt die CSS-Klasse fest, die auf das textElement_ des Felds angewendet wird.
Unterschrift:
setClass(cssClass: string | null): void;
Parameter
Parameter |
Typ |
Beschreibung |
cssClass |
String | null |
Der neue CSS-Klassenname oder null, der entfernt werden soll. |
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 `FieldLabel.setClass()` method allows you to dynamically change the CSS class applied to the text element of a field label within Blockly."],["This method accepts a single parameter: `cssClass`, which can be a string representing the new CSS class name or null to remove any existing class."],["Calling `FieldLabel.setClass()` updates the visual appearance of the field label by applying or removing a specific CSS class."]]],[]]