Example
let style = curScore.style;
let genClef = style.value("genClef"); // retrieves style setting on clefs generation, true by default
style.setValue("genClef", false); // disables generating clefs for this score
Methods
(static) resetValue(key)
Resets the value of style setting named key to its default.
Key should be one of Sid values.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
Engraving.Sid | Key |
- Since:
- 4.7
(static) setValue(key, value)
Sets the value of style setting named key to value.
Key should be one of Sid values.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
Engraving.Sid | Key |
value |
Variant | Value |
(static) value(key) → {Variant}
Get the value of style by key.
Key should be one of Sid values.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
Engraving.Sid | Key |
Returns:
Value. Type of the returned value depends on type of the corresponding style setting.
- Type
- Variant