最有用的全选/取消全选复选框格式
全选或取消全选复选框的最佳模式是什么。 有人能想出更好的方法来以这种形式呈现它:
What is the best pattern for having a select all or deselect all checkboxes. Can someone come up with a better way to have it in this form:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
老实说,我从来不喜欢使用复选框作为“全选”选项的想法,尽管您经常看到它。 这不是一个要选择的单个项目,而是一个动作。 如果您选择全部,然后开始取消选择列表中的各个项目,则全选复选框的“选中”状态会变得本质上令人困惑。 我更喜欢使用一个简单但明显的链接/按钮,在单击时在“全选”和“取消全选”之间切换。 当取消选择单个项目时,不会出现任何让您感到困惑的状态,并且按下按钮的结果是毫无疑问的。 该操作的排他性使其完全合理地来回切换(而不是使用两个始终可见的按钮;一个用于全选,一个用于取消全选),因为您最多只需单击两次即可实现所需的行为。 它在视觉上将该“操作”与各个项目区分开来,防止误点击并区分行为。
I'll be honest, I've never liked the idea of using a checkbox for the "select all" option, even though you see it a lot. It's not a single item to be picked, it's an action. And if you select all and then start unselecting individual items in the list, the "checked" state of the select all checkbox becomes inherently confusing. I prefer to use a simple but obvious link/button that toggles between "select all" and "unselect all" as it is clicked. There is no state to confuse you with when individual items have been deselected, and the outcome of pushing the button is never in doubt. The exclusive nature of the operation makes it perfectly reasonable to toggle back and forth (rather than using two always visible buttons; one for select all, one for unselect all), since you are at most two clicks away from your desired behavior. And it visually separates out this "action" from the individual items, preventing misclicks and distinguishing behavior.
如果您可以使用列表格式化对话框,我喜欢“列表标题中的复选框”方法(大多数用户凭直觉知道如何使用它)。
如果您不想使用列表,我认为可以使用按钮或一个超链接(从“全选”切换到“全选”)比另一个复选框效果更好,而另一个复选框在所有其他复选框中很难辨认。此外,取消选中“全选”复选框并不一定意味着“选中”无”用户的功能。
If you can format your dialog with lists, I like the "checkbox in the list header" method (and most users intutively know how to use it).
If you do not want to use a list, I think a button or a hyperlink (that toggles from "Select All" to "Select None" would work better than yet another checkbox which is hard to make out among all the other checkboxes. Also, unchecking a "check all" checkbox would not necessarily immply a "check none" functionality for a user.
只需将全选复选框靠近左边框即可。 也许可以更改“所有以前的游戏”等文本,以明确选择的“所有”是什么。
Just bring the Select All check box closer to the left border. Perhaps change the text something like "All previous games" etc. to make it clear what "all" is being selected.
我想说,这是进行全选/取消全选的最直观方式。 但我也看到有些人使用链接,但我更喜欢这样。
I would say that It's the most intuitive way to make the select/deselect all. But I've also seen some use a link, but i would prefer that.
这是 WinForms 中的用户控件实现 @nezroy 答案的逻辑。 这允许您指定一个 InitialAction [SelectAll 或 DeselectAll 之一]。
Here's the logic for a User Control in WinForms to implement @nezroy's answer. This lets you specify an InitialAction [one of SelectAll or DeselectAll] as well.