Checkbox
|
The page is in the process of being translated. |
using GLMakie
f = Figure()
gl = GridLayout(f[2, 1], tellwidth = false)
subgl = GridLayout(gl[1, 1])
cb1 = Checkbox(subgl[1, 1], checked = false)
cb2 = Checkbox(subgl[2, 1], checked = true)
cb3 = Checkbox(subgl[3, 1], checked = true)
Label(subgl[1, 2], "Dataset A", halign = :left)
Label(subgl[2, 2], "Dataset B", halign = :left)
Label(subgl[3, 2], "Dataset C", halign = :left)
rowgap!(subgl, 8)
colgap!(subgl, 8)
ax = Axis(f[1, 1])
for cb in [cb1, cb2, cb3]
lines!(ax, cumsum(randn(1000)), alpha = @lift($(cb.checked) ? 1.0 : 0.1))
end
f
Attributes
checkboxcolor_unchecked
Defaults to @inherit :backgroundcolor :white
The color of the checkbox background when unchecked.
checkboxstrokecolor_checked
Defaults to COLOR_ACCENT[]
The strokecolor of the checkbox background when checked.
checkboxstrokecolor_unchecked
Defaults to COLOR_ACCENT[]
The strokecolor of the checkbox background when unchecked.
checked
Defaults to false
If the checkbox is currently checked. This value should not be modified directly.
checkmarkcolor_checked
Defaults to :white
The color of the checkmark when the mouse clicks the checkbox.