Setting the default condition in a dialog panel

Hi,

I am trying to create a warning dialog box that would prompt the user if he really wants to continue. Basically:

Prompt String: Do really want to reset the zero point? with "Yes" and "No". When the dialog box is displayed the "Yes" button has the focus and would be executed with a return key. Is there a way to make the "No" button have the focus and be executed with a return key.

I think it is a best practice it this way.

Andy
Don't think it's possible to give the "no" button default focus with the inbuilt dialogues. Why not rephrase the question?

Doalert 1, "Do you want to keep the current zero point (yes) or reset it (no)?"
print V_flag
//V_flag =  1:  Yes clicked.
//  2:  No clicked.
//  3:  Cancel clicked.


Please note that you can use keyboard shortcuts to select these buttons. On a Mac you can press Cmd-Y for yes, Cmd-N for no.

If you really, really want to do exactly what you said you could create your own panel with a couple of button, and use pauseforuser, but I don't think that's immediately addressable with the keyboard, I think you may have to use a mouse to click the button.

Andrew
andyfaff wrote:
Please note that you can use keyboard shortcuts to select these buttons. On a Mac you can press Cmd-Y for yes, Cmd-N for no.
Andrew


Actually, you don't need the Cmd key at all. Just Y or N.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com