Skip to content

How Do I Pre-Check Checkboxes? #386

@TheCedarPrince

Description

@TheCedarPrince

Hey there, I tried asking for help on the Julia Slack, Zulip, and Discourse, but no luck anywhere. Here is the question I had:

How do I use Interact.jl to present a list of checkboxes with some of the boxes already checked off? Tried following the documentation and couldn’t figure out how to set specific checkboxes to true (i.e. checked off).

What I have currently, is this:

image

The boxes are empty by default. What I would like to have happen is for a few boxes to already be checked off when they are first shown like this:

image

The code I have been using is:

options = ["a", "b", "c"]
wdg = checkboxes(options)
wdg[:a] = true
wdg[:c] = true
wdg

What I don't understand is why the checkbox for "a" and "c" is not already showing up checked off. Any thoughts?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions