Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a style-customizable checkbox bar
ResourceFunction["StyledCheckboxBar"][x,{val1,val2 ,val3…}] represents a styled checkbox bar with setting x and with checkboxes for values vali to include in the List x. | |
A StyledCheckboxBar with default states:
In[1]:= |
Out[1]= |
The second argument can be a List of rules of the form value → label:
In[2]:= |
Out[2]= |
Any Wolfram Language expression can be used as the label:
In[3]:= |
In[4]:= |
Out[4]= |
Appearance can be used to change the colors of the different states. Use the sub-option "InactiveColor" to change color when the state is False:
In[5]:= |
Out[5]= |
The sub-option "ActiveColor" modifies the color when the state is True:
In[6]:= |
Out[6]= |
"Hover" modifies the color when the mouse is hovered over the checkbox when it is in the False state:
In[7]:= |
Out[7]= |
"CheckColor" modifies the color of the check mark when in the True state:
In[8]:= |
Out[8]= |
"Alignment" can be used to arrange the layout either horizontally or vertically:
In[9]:= |
Out[9]= |
Specify the number of rows or columns as second item in the list:
In[10]:= |
Out[10]= |
Setting Enabled to False prevents the checkbox bar from being controllable:
In[11]:= |
Out[11]= |
Adjust the spacings between individual checkboxes:
In[12]:= |
Out[12]= |
Increase the size of the checkboxes:
In[13]:= |
Out[13]= |
StyledCheckboxBar and CheckboxBar are similar in functionality:
In[14]:= |
Out[14]= |
In[15]:= |
Out[15]= |
However, various stylings e.g. "InactiveColor" cannot be specified in the checkboxes, in contrast to StyledCheckbox:
In[16]:= |
Out[16]= |
This work is licensed under a Creative Commons Attribution 4.0 International License