blockly > Motyw > setBlockStyle
Metoda Theme.setBlockStyle()
Zastępuje styl lub dodaje go do mapy blockStyles.
Podpis:
setBlockStyle(blockStyleName: string, blockStyle: BlockStyle): void;
Parametry
Parametr |
Typ |
Opis |
blockStyleName |
ciąg znaków |
Nazwa stylu bloku. |
blockStyle |
BlockStyle |
Styl bloku. |
Zwroty:
nieważne
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-09 UTC.
[null,null,["Ostatnia aktualizacja: 2024-09-09 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"]]