列表框中的最大条目数
简单列表框(组合框)应包含的最大条目数是多少?美国有 50 个州——50 个州太多了吗?世界上有 270 多个国家和地区 - 270 个太多了吗?
列表框何时应包含搜索或预输入功能?设计者什么时候应该考虑列表框以外的东西?
您是否有任何很酷的小部件的链接,可以帮助用户从众多选项之一中进行选择?
先感谢您。
What is the maximum number of entries a simple ListBox (ComboBox) should contain? There are fifty states in the US - is 50 too many? There are over 270 countries and territories in the world - is 270 too many?
When should a ListBox include search or type-ahead capabilities? When should the designer consider something other than a ListBox?
Do you have any links to cool widgets that help a user select from one of many options?
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
如果用户知道她或他想要从预先输入的排序良好的列表中获得精确的值,那么超过 1000 个项目就可以了。严重地。亲自尝试一下:搜索您的硬盘驱动器,生成 1000 个左右的文件,看看滚动或提前输入您知道的文件有多困难。
比原始项目数更重要的是列表中的项目与可滚动窗格中可见的项目的比率,无论您是在谈论列表框还是组合框的下拉部分。您希望一次至少有 5% 的项目可见。因此,对于 1000 个项目,您需要一个大约 800 像素高的窗格(每行 16 像素)。考虑到典型的低端桌面显示器尺寸,这将大约 1000 设置为限制。如果您谈论的是使用笔记本电脑使用网站的用户,那么您只有大约 560 像素(允许浏览器控件等),所以现在您正在查看 700 个项目。还是很多。我们假设有一个适当的可滚动列表,其中列表通过拖动滑块立即滚动。
我只看到当项目数量更像是 1000 比 100 时才需要过滤/搜索控件(而不是单独输入),尽管您需要对特殊情况进行例外处理(例如,当用户并不真正知道什么是/他确切地希望并且需要根据各种标准探索替代方案,或者当有大量项目都以相同的 9 个字母开头时)。
始终提前输入。没有理由不这样做,即使项目数量很少,它也有利于仅使用键盘而不是鼠标(对于数据输入很常见)的用户。将其视为标准。您不希望用户必须猜测您是否选择对给定字段进行预先输入(“他认为 10 项就足够了吗?他有过吗?”),所以只要一直保留即可。
If the user knows the precise value she or he wants from a well-sorted list with type-ahead, then over 1000 items is okay. Seriously. Try it yourself: Do a search of your hard drive that yields 1000 or so files and see how hard it is to scroll or type-ahead to a file you know is there.
What matters more than the raw number of items is the ratio of items in the list to the items visible in your scrollable pane, whether you’re talking about a list box or the dropdown portion of a combo box. You want at least 5% of your items visible at a time. So for 1000 items, you need a pane about 800 pixels high (at 16 pixels per line). That sets about 1000 as the limit given typical low-end desktop monitor sizes. If you’re talking about users with laptops using a web site, then you’ve only got about 560 pixels (allowing for browser controls and such), so now you’re looking at 700 items. Still a lot. We’re assuming a proper scrollable list where the list scrolls instantly with dragging the slider.
I only see a need for filtering/search controls (versus type ahead alone) when the number of items is more like 1000s than 100s, although you need to make exceptions for special cases (e.g., when the user doesn't really know what s/he precisely wants and needs to explore the alternatives on various criteria, or when there's a large number of items all beginning with the same 9 letters).
Always have type-ahead. There no reason not to, and even with a small the number of items, it benefits users using the keyboard only rather than the mouse (very common for data entry). Treat it as a standard. You don't want users having to guess if you chose to have type-ahead or not for a given field ("Does he think 10 items is enough? Does he ever have it?"), so just have it all the time.
我建议每当列表超过 50 个项目时就使用自动完成器。
I would suggest that an autocompleter be used whenever a list is larger than about 50 items.
说到这里的可用性,有一件事没有被提及。
特别是对于国家/地区列表,如果您要包含 200 个国家/地区的完整列表(无论什么),根据您预期的市场,将最受欢迎的几个国家/地区列出在列表的最顶部通常是一个好主意。
这似乎违反直觉,因为程序员喜欢漂亮、整齐排序的事物列表(包括我自己),但没有人喜欢滚动到列表底部附近找到“美国”。或者,总是看到柬埔寨、喀麦隆,然后是加拿大。我无法在地图上显示柬埔寨或喀麦隆的位置(尽管我的地理技能低于平均水平),但这些名字已经被这些列表烙印在我的脑海里。
请记住,并非所有用户都使用甚至了解自动完成功能,甚至并非所有用户都在列表中键入他们想要的内容。这当然是一个极好的帮助,但不应该依赖它。
Talking about usability here, one thing hasn't been mentioned.
For the list of countries in particular, if you're including the full list of 200-whatever it's often a good idea to list the most popular few at the very top of the list, based on your anticipated market.
It might seem counter-intuitive since programmers like nice, neatly sorted lists of things (myself included), but no one likes scrolling to near the bottom of the list to find "USA". Or, always seeing Cambodia, Cameroon, and then Canada. I couldn't show where Cambodia or Cameroon are on a map (though my geography skills are below-average), but the names have been seared into my mind by these lists.
Remember that not all users use, or even know about, auto-complete or even typing what they want in a list. It's certainly an excellent aid, but it should not be relied upon.
我认为 270 太多了,而且会是一次糟糕的体验。我会考虑将国家/地区分组为地区/大陆,并将列表保留下来。 UPS/联邦快递/佳能都这样做。
我不确定一个神奇的数字,但我认为查看 51 个状态 [50 + DC] 足够常见,可以接受。我想其他国家也会有类似的轨道。
例如:法国有100个省,分为22个大都市和4个海外地区。
I would think that 270 is too many and would be a bad experience. I would think about grouping countries into regions/continents and keep the list down. UPS/Fedex/Canon all do this.
I'm not sure of a magic number, but I think that looking at 51 states[50 + D.C.] is common enough that it's acceptable. I would imagine that there would be a similar track for the other Countries as well.
For instance: France has 100 departments are grouped into 22 metropolitan and four overseas regions.
对于超过 50 左右的内容(实际上,即使在我看来,这也是推动它的原因),我宁愿有一个带有自动完成功能的简单文本框(想想谷歌搜索建议),而不是下拉列表。
For more than about 50-ish (and really, even that is pushing it IMO) I'd much rather have a simple text box with auto-complete (think Google search suggest) than a drop-list.
我不是美国人,也没有为美国市场开发,但我总是发现这些州的下降很可怕。
难道不能让用户输入邮政编码并自动查找州吗?
I'm not american, nor have I developed for the american market yet, but I've always found those state dropdowns horrible.
Isn't it possible to have the user enter the Zip code and to look up the state automatically?