Wednesday, November 27, 2019

modal dialog - Is a cancel button necessary in a windows form?


After reading the question "Is a cancel button necessary for a web form?", I still ask myself, whether the same applies to a Windows form/dialog box.


Consider the following dialog box:


enter image description here


Compared to the following mockup:


enter image description here


Although I never did omit the Cancel button until now, I have the feeling, that the user might well enough know that the upper right red "X" is here to cancel any dialog.



So I'll effectively give him 2 identical options to cancel (red "X" and cancel button) whereas he only gets one option to store (the OK button).


My question is:


Do you think it is a good idea to remove the cancel button in order to simplify my dialog boxes?


Update 1


What about omitting the "X" instead?


enter image description here



Answer



The top "X" button closes the dialog (according to its tooltip), it doesn't cancel it (necessarily).


Microsoft's UX guidelines say:




Label a button Cancel if canceling returns the environment to its previous state (leaving no side effect); otherwise, label the button Close (if the operation is complete), or Stop (if the operation is in progress) to indicate that it leaves the current changed state intact.



The security that comes from a "Cancel" button is the assurance that there's no side-effect. This is especially true for a dialog whose value is optional, or one shown as part of a longer operation.


I understand that your motive for removing the "Cancel" button is to remove the visual cruft of unnecessary controls, but I think the best way to do so would be to set the OK button as the form's default button to both visually set it apart, and to do your best to prevent the user needing to target the button with the mouse.


Perhaps the most explicit instruction Microsoft provides is the following (from the dialog box UX guidelines):



Provide a Cancel button to let users explicitly abandon changes. Dialog boxes need a clear exit point. Don't depend on users finding the Close button on the title bar. Exception: Don't provide a Cancel button for dialog boxes without settings. The OK and Close buttons have the same effect as Cancel in this case.



No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...