01-27-2009 07:13 AM
Hello,
I got the following problem. I want to use the display message to user dialog to display a question the user can answer by clicking the yes or no (cancel) button. The standard selection (for the return keyboard key) is always the first message box. I want to bind the default setting to the cancel button. Binding the cancel button to the first button does not solve the problem because the X button at the right top of the dialog is always linked to the second displayed button. By pressing the X button the user would trigger the not desired yes case instead of cancel.
How can I either change the default selection to the second button or link the X to the first button or do I have to write my own sub VI?
Thanks in advance.
01-27-2009 07:30 AM - edited 01-27-2009 07:38 AM
Hi tiekai,
you can send a key down event (tabulator) to activate the abort button.
See the example picture.
But with this function you need the mouse or another tab to get ok, while you without changes can use Esc to abort or the little x, true is only with space possible.
Mike
01-28-2009 08:11 AM
Hello tiekai,
so far I do not see a way to achieve what you wants with the from LV given function. One way could be the thing that MikeS81 suggested.
An other attempt would be to programm such a dialog by your self. I would propose you to have a look at "Three Button Dialog CORE.vi" that can be found in the blockdiagramm of "Three Button Dialog.vi" in the functions. You could change the code to get a two button dialog.
Regards
Johannes Graeper
NI Germany