Wednesday, October 28, 2015

controls - Tri-state checkbox: Which state should be selected after clicking?


There is a hierarchy of selectable items, let's say a parent and two children. All three items have checkboxes. When both children are checked, the parent's checkbox is also checked. When both children are unchecked, the parent's checkbox is also clear. When only one of the children is checked, the parent is half-checked (color fill or a diagonal inside the checkbox).


This relationship works both ways - the parent's checkbox works as a select/clear all for the children checkboxes.


What should happen when users click the half-checked parent - check or uncheck? Or rather, what factors might influence this decision?



Answer





what factors might influence this decision?



Are new children checked by default?


This of course depends on the application. Since you didn't specify: lets discuss "selecting folders for backup". The best solution I found are WinZip project files, which works like this:



  • Even if all children are checked individually, the parent is set to "mixed." This indicates that unknown folders are not included.

  • When a folder is checked, all child items are displayed as "checked", and new child folders will be "checked", too.

  • When clicking the parent checkbox, you could cycle through "checked - all children checked", "unchecked - all children unchecked" and "previous mixed state."



I'd intuitively make the cycle mixed --> checked --> unchecked.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...