LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display message to user change default selection

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.

0 Kudos
Message 1 of 3
(2,694 Views)

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

Message Edited by MikeS81 on 01-27-2009 02:38 PM
Message 2 of 3
(2,685 Views)

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

0 Kudos
Message 3 of 3
(2,652 Views)