blockly > Design > setBlockStyle
Theme.setBlockStyle()-Methode
Überschreibt einen Stil oder fügt der BlockStyles-Karte einen Stil hinzu.
Unterschrift:
setBlockStyle(blockStyleName: string, blockStyle: BlockStyle): void;
Parameter
Parameter |
Typ |
Beschreibung |
blockStyleName |
String |
Der Name des Blockstils. |
blockStyle |
BlockStyle |
Der Blockstil. |
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-10-11 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-10-11 (UTC)."],[[["The `Theme.setBlockStyle()` method allows you to override or add a style to the theme's blockStyles map."],["It takes two arguments: `blockStyleName` (string) to identify the style and `blockStyle` (BlockStyle) containing the style properties."],["Calling this method modifies the theme's blockStyles, affecting the visual appearance of blocks using the specified style."]]],["The `setBlockStyle` method within the `Theme` class allows modification of block styles. It takes two parameters: `blockStyleName`, a string defining the name of the style, and `blockStyle`, a `BlockStyle` object containing the style's properties. This method either overrides an existing style or adds a new one to the `blockStyles` map. The method's return type is void, indicating it does not return a value.\n"]]