许多人都知道“问题”类型的 MessageBoxIcon
。如果你对这个图标不是特别熟悉,它只是一个美化的问号。我很好奇这个图标在专业应用程序中是否可以接受。例如,假设我有一个按钮,单击该按钮将清除整个表单上的所有文本字段。单击按钮时,我想警告用户他的操作将要做什么。我可以写以下任一内容:
MessageBox.Show("Really clear all data?", "Clear confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
或者
MessageBox.Show("Really clear all data?", "Clear confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
你们认为两者中哪一个更专业?
Many know of the MessageBoxIcon
of type "question". If you are not particularly familiar with this icon, it is just a glorified question mark. I am curious as to whether or not this icon is acceptable in professional applications. For example, let's assume that I have a button which, when clicked, will clear all text fields on the entire form. When the button is clicked I would like to warn the user about what his action is about to do. I could write either of the following:
MessageBox.Show("Really clear all data?", "Clear confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
OR
MessageBox.Show("Really clear all data?", "Clear confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
Which would you all say is the more professional of the two?
发布评论
评论(9)
我真的不认为这是“专业”的问题,但这绝对违背了微软的指导方针。
MB_ICONQUESTION
标志的文档具有以下内容说(对于MessageBoxIcon
枚举):Windows 用户体验交互指南的 标准图标 部分说得非常明确问号图标应该仅用于指示“帮助入口点”:
我强烈建议您阅读整个文档;它提供了许多有关选择正确图标的有用提示。但在这种特殊情况下,由于您要求用户确认涉及潜在数据丢失的操作,因此您绝对应该使用警告图标,与本指南一致:
I don't really think it's an issue of "professionalism", but it definitely contradicts Microsoft's guidelines.
The documentation for the
MB_ICONQUESTION
flag has this to say (and the same for the "Question" member of theMessageBoxIcon
enum):And the Standard Icons section of the Windows User Experience Interaction Guidelines says very explicitly that the question mark icon should only be used to indicate a "Help entry point":
I highly recommend that you read the entire document; it provides lots of helpful tips on choosing the correct icon. But in this particular case, since you're asking the user to confirm an operation that involves the potential loss of data, you should definitely use the warning icon, consistent with this guideline:
我会在对话框中使用警告图标,警告用户将发生不好的(或不可逆转的)事情。
警告图标的目的是吸引用户注意他即将犯错误。
即使对话框包含问题也是如此。
I would use a warning icon for dialogs that warn the user that something bad (or irreversible) will happen.
The point of a warning icon is to draw the user's attention to the fact that he's about to make a mistake.
This is true even if the dialog contains a question.
清除数据是需要正确突出显示的事情。必须警告用户,特别是当它是所有数据时,并且如果您没有任何备份解决方案。因此第二个更适合这种情况
Well clearing data is something that needs to highlighted correctly. The users must be warned, especially when it is All Data, and if you don't have any backup solutions. Thus the second one is more appropriate in this scenario
我通常遵循的规则是,如果您使用警告图标,它应该指示问题,例如:
一个问题更像是:
文本也应该是完整且语法正确的句子。
I generally follow the rule that if you use a Warning icon, it should indicate the issue, like:
A question would be more like:
The text should also be complete and grammatically correct sentences.
比图标更重要的是:如果您认为“否”按钮有潜在风险,则应将其设为默认按钮,即使用采用
MessageBoxDefaultButton
参数的重载并指定:More important than the icon: you should make the No button the default if you feel it's a potentially risky action, i.e. use an overload that takes a
MessageBoxDefaultButton
parameter and specify:最专业的做法是使操作不可撤销,从而使确认/警告完全不必要。
如果确实无法撤消,请遵循 Windows 指南,正如 Cody 在他的回答中列出的那样。
The most professional thing would be to make the action undoable, and thus make the confirmation/warning completely unnecessary.
If it truly cannot be undoable, then follow the Windows guidelines, as Cody listed in his answer.
他们同样专业或不专业,具体取决于您的观点 =)。您应该考虑您想要与用户沟通的内容。根据您对问题的描述,我倾向于使用“警告”,因为清除这些字段似乎可能会产生负面后果。
They're equally professional or unprofessional depending on your perspective =). You should consider what you are trying to communicate to your user. From your description of the problem, I would lean towards using 'warning' since it seems that clearing these fields may have negative consequences.
事实上,你可以使用其中任何一个,而且看起来都不错。但这并不意味着它的设计是正确的。
清除所有用户数据应该有一个警告图标。
原因是什么?您弹出的消息应该传达当前的情况。使用?图标可能无法传达正确的信息。但使用警告图标确实如此 - 因为应该警告用户应用程序打算清除她的所有数据。
The reality of it is you could use either, and it would look fine. But that wouldn't mean it was designed correctly.
Clearing all the user's data is something that should have a warning icon.
The reason? The message you are popping up should convey the situation at hand. Using the ? icon probably doesn't convey the right message. Using the warning icon does though - since the user should be warned that the application intends to clear all of her data.
老实说..我会说
“您确定要清除所有数据吗”
而不是“真的清除所有数据吗?”
...不管图标是什么。有关图标的信息,您可以阅读其他帖子!
Honestly.. I would say
"Are you sure you wish to clear all data"
instead of"Really clear all data?"
... No mather what the icon is.For information on the icon you can read the other posts!