Introduction
Only elements that expose a style
property can be styled programmatically.
The following elements expose the style
property:
Box
Button
Checkbox
CheckboxGroup
Dropdown
Footer
Header
ProgressBar
QuickActionBar
RadioButtonGroup
TextBox
TextInput
UploadButton
About Mixins
Mixins provide functionality that other elements can inherit and use.
Mixins are not elements. You cannot add mixins to a page in the Editor like other $w
elements, and mixins are not meant to be used directly
in your code.
For example, you would not write code like this, because it is out of context:
javascript | Copy Codelet bgColor = $w("#StyleMixin").style.backgroundColor;
Instead, you can code the following if myElement
is an element that
"mixes in" StyleMixin
.
javascript | Copy Codelet bgColor = $w("#myElement").style.backgroundColor;
Was this helpful?