Документация Engee

Checkbox

Страница в процессе перевода.

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

Атрибуты

MarkdownAST.Heading(3)

Defaults to Inside()

The align mode of the checkbox in its parent GridLayout.

MarkdownAST.Heading(3)

Defaults to COLOR_ACCENT[]

The color of the checkbox background when checked.

MarkdownAST.Heading(3)

Defaults to @inherit :backgroundcolor :white

The color of the checkbox background when unchecked.

MarkdownAST.Heading(3)

Defaults to COLOR_ACCENT[]

The strokecolor of the checkbox background when checked.

MarkdownAST.Heading(3)

Defaults to COLOR_ACCENT[]

The strokecolor of the checkbox background when unchecked.

MarkdownAST.Heading(3)

Defaults to 1.5

The strokewidth of the checkbox poly.

MarkdownAST.Heading(3)

Defaults to false

If the checkbox is currently checked. This value should not be modified directly.

MarkdownAST.Heading(3)

Defaults to CHECKMARK_BEZIER

The checkmark marker symbol. Anything that scatter can use.

MarkdownAST.Heading(3)

Defaults to :white

The color of the checkmark when the mouse clicks the checkbox.

MarkdownAST.Heading(3)

Defaults to :transparent

The color of the checkmark when unchecked.

MarkdownAST.Heading(3)

Defaults to 0.85

The size of the checkmark, relative to the size.

MarkdownAST.Heading(3)

Defaults to :center

The horizontal alignment of the checkbox in its suggested boundingbox

MarkdownAST.Heading(3)

Defaults to Auto()

The height setting of the checkbox.

MarkdownAST.Heading(3)

Defaults to !

A function that is called when the user clicks to check or uncheck. The function is passed the current status as a Bool and needs to return a Bool that decides the checked status after the click. Intended for implementation of radio buttons.

MarkdownAST.Heading(3)

Defaults to 0.15

Roundness of the checkbox poly, 0 is square, 1 is circular.

MarkdownAST.Heading(3)

Defaults to 11

The size (width/height) of the checkbox

MarkdownAST.Heading(3)

Defaults to true

Controls if the parent layout can adjust to this element’s height

MarkdownAST.Heading(3)

Defaults to true

Controls if the parent layout can adjust to this element’s width

MarkdownAST.Heading(3)

Defaults to :center

The vertical alignment of the checkbox in its suggested boundingbox

MarkdownAST.Heading(3)

Defaults to Auto()

The width setting of the checkbox.