How to get the value(s) from a CheckBoxButtonGroup

To get values from a Slider, or Select we can use slider.value:

so for instance:

select = Select(title=“Make a selection”, value=“All”, options=position_options)
select .value

“All”

however when I try the same thing for CheckBoxButtonGroup I get an error:

cbbg = CheckboxButtonGroup(labels=[1,2,3,4,5], active=[0,1])
cbbg .value

AttributeError: ‘CheckboxButtonGroup’ object has no attribute ‘value’

So, how does one obtain the values from a CheckBoxButtonGroup?

You can get cbbg.active, it’s a range() list which has the indices of the checked checkboxes

···

Le mardi 3 janvier 2017 06:31:37 UTC-5, fishy a écrit :

To get values from a Slider, or Select we can use slider.value:

so for instance:

select = Select(title=“Make a selection”, value=“All”, options=position_options)
select .value

“All”

however when I try the same thing for CheckBoxButtonGroup I get an error:

AttributeError: ‘CheckboxButtonGroup’ object has no attribute ‘value’

So, how does one obtain the values from a CheckBoxButtonGroup?

cbbg = CheckboxButtonGroup(labels=[1,2,3,4,5], active=[0,1])
cbbg .value