blockly > BlockSvg > setStyle
Metoda BlockSvg.setStyle()
Ustaw styl i kolor bryły.
Podpis:
setStyle(blockStyleName: string): void;
Parametry
Parametr |
Typ |
Opis |
blockStyleName |
ciąg znaków |
Nazwa stylu bloku. |
Zwroty:
nieważne
Wyjątki
{Błąd}, jeśli styl bloku nie istnieje.
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-20 UTC.
[null,null,["Ostatnia aktualizacja: 2024-09-20 UTC."],[[["The `setStyle` method allows you to apply a predefined style and color scheme to a block element."],["This method requires a single argument, `blockStyleName`, which is a string representing the name of the desired style."],["If the specified `blockStyleName` doesn't exist within the system, the method will throw an error."],["Calling `setStyle` will not return any specific value, indicating its primary function is to modify the visual appearance of the block directly."]]],[]]