GUI设计:禁用标签?
我在网上找不到任何对这个问题有用的东西:
禁用 GUI(表单等)上的标签通常是一个好主意还是被认为是一个错误?
我并不是专门讨论 HTML,只是讨论任何桌面 GUI 工具包。
问题是,标签通常放在另一个 GUI 元素前面,例如文本字段、下拉框、单选按钮等。当这些输入组件被动态禁用时,即取决于其他 GUI 元素的状态,是吗?即使它本身不提供输入方式,也禁用它的标签是个好主意吗?
I couldn't find anything useful on the net to this question:
Is it generally a good idea to disable labels on GUIs (forms etc.) or is it considered a blooper?
I'm not talking about HTML specifically, just any desktop GUI toolkit.
The question is, a label is usually put in front of another GUI element, like a textfield, dropdown box, radio button/s etc. When these input components are being disabled dynamically, that is upon the state of other GUI elements, is it a good idea to also disable its label, even though it provides no means for input itself?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,您应该禁用(灰显)标签和控件。这适用于复选框、单选按钮、旋转框、下拉菜单等。这是 Windows 和 Mac OS 中的常见做法。
如果您的控件按层次排列,正如您在“设置/首选项”对话框中常见的那样,则应在禁用或取消选择父控件时禁用所有从属控件。
另一个重要的附加点是,您还应该确保用户清楚为什么某个项目被禁用。有时,在不明显的情况下,最好允许用户单击不可用的控件(而不是禁用控件),然后使用对话框或其他方法来解释控件不可用的原因。
从编程的角度来看,您可能希望将控件和标签放入一个公共容器中,然后禁用该容器并允许“enabled”属性向下级联到标签和控件。大多数现代框架都以这种方式工作(例如,WPF、Flex、HTML)。
Generally, you should disable (gray out) the label as well as the control. This applies to checkboxes, radio buttons, spin boxes, drop-down menus, etc. This is common practice in Windows and Mac OS.
If you have your controls arranged hierarchically, as you would commonly see in a Settings/Preferences dialog, you should disable all subordinate controls when you disable or deselect a parent control.
An important additional point is that you should also make sure it is obvious to the user why an item is disabled. Sometimes, in cases where it's not obvious, it is preferable to allow users to click on non-available controls--rather than disable the controls--then use a dialog or some other method to explain why the control is unavailable.
From a programming point of view, you may want to put your control and label into a common container, then disable the container and allow the "enabled" property to cascade downward to the label and control. Most modern frameworks work this way (e.g., WPF, Flex, HTML).