显示文本字段无效的最 Cocoaish 方式是什么?
我有一个文本字段,每当它失去焦点时都会对其进行验证。我希望能够表明该值在输入过程中无效,以便用户有机会在明确将焦点从框移开并触发验证之前纠正错误。
我见过各种实现,包括在字段周围放置红色边框、出现无效输入的小图标或一些警告文本。
以符合 Cocoa 约定和 Apple 人机界面指南的方式执行此操作的最佳方法是什么?
I have a text field which is validated whenever it loses focus. I want to be able to indicate that the value invalid during input so the user has the opportunity to correct their mistake before explicitly moving focus away from the box and triggering validation.
I have seen various implementations, including placing a red border round the field, a little icon that comes up for invalid input, or a bit of warning text.
What is the best way to do this in a way that complies with the conventions of Cocoa and the Apple Human Interface Guidelines?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
发布评论
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
将其背景设置为浅红色。当您超过 Twitter 选项卡中的消息长度限制时,Adium 就会执行此操作。
Adium 使用的具体颜色是:
作为校准(通用 RGB)颜色。
Set its background to light red. This is what Adium does when you go over the message length limit in a Twitter tab.
The specific color Adium uses is:
as a calibrated (Generic RGB) color.