2
Reply

Setting the default Yes/No for a Dialog Result

Jerry Fike

Jerry Fike

Feb 18 2017 1:27 PM
243
I'm working on a small c# timer alarm wfa and have a "Save Configuration" button when clicked puts up a dialog "Save Configuration" with the standard "Yes" and "No" buttons.  Is there a way to make the "No" button the default (so simply hitting "Enter" takes the "no" path instead of the default "yes"?)
 
I guess I could write the dialog in reverse like "Don't save the configuration file" YesNo, but that seems rather vague.
 
Most of the time, the user would likely not want to save the file, plus the next dialog would be to exit or not.  I'd like to be able to simply hit "Enter" twice. 
 
 

Answers (2)