☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Retrieve Active Labels of Checkbox Group?

Community Support
wjk68
wjk68

The CheckboxGroup allows access to the active indices and all the labels through attributes but does not have an attribute for the **active labels. **

checkbox = CheckboxGroup(labels = [‘foo’, ‘bar’, ‘baz’], active = [0])

print(checkbox.active)

print(checkbox.labels)

``

[0]
['foo', 'bar', 'baz']

``

****I think it would be useful if it were possible to access the labels themselves that are selected in addition to just the indices.

Currently, I do the following to get the active labels:

active_labels = [checkbox.labels[i] for i in checkbox.active]
print(active_labels)

``

['foo']

``

Is there an easier method to get the active labels that I am missing?

⌁   Link to post

End of archived discussion · Replies are disabled