Wolfram Research

Function Repository Resource:

CheckboxBarSelectAll

Source Notebook

A version of CheckboxBar which includes a “Select all” checkbox

Contributed by: Jon McLoone

ResourceFunction["CheckboxBarSelectAll"][Dynamic[x],{val1,val2,,}]

takes the setting to be the dynamically updated current value of x, with the values in the list x being reset every time a checkbox is clicked.

ResourceFunction["CheckboxBarSelectAll"][x,{val1lbl1,val2lbl2,}]

represents a checkbox bar in which the checkbox associated with value vali has label lbli.

Details and Options

Additional information about usage and options.
ControlPlacement Top Where to place the "Select all" checkbox
"Label" "Select all" The text to label the "Select all" checkbox with

Examples

Basic Examples

A selector for three possible vaues:

In[1]:=
ResourceFunction["CheckboxBarSelectAll"][Dynamic[x], {1, 2, 3}]
Out[1]=
In[2]:=
ResourceFunction["CheckboxBarSelectAll"][
 Dynamic[x], {1 -> "one", 2 -> "two", 3 -> "three"}]
Out[2]=

Options

Using ControlPlacement with values Left, Right, Top or Bottom places the “Select all” checkbox:

In[3]:=
ResourceFunction["CheckboxBarSelectAll"][Dynamic[x], {1, 2, 3}, ControlPlacement -> Left]
Out[3]=

The “Select all” checkbox label can be changed with “Label”:

In[4]:=
ResourceFunction["CheckboxBarSelectAll"][Dynamic[x], {1, 2, 3}, "Label" -> "All"]
Out[4]=

The options of CheckboxBar are supported:

In[5]:=
ResourceFunction["CheckboxBarSelectAll"][Dynamic[x], {1, 2, 3}, Appearance -> "Vertical"]
Out[5]=

Resource History

License Information