03-21-2014 09:36 AM
Hi All,
If I have multiple dialog windows (that are modal), is there any way to control how they are ordered (i.e. frontmost to rearmost)?
At the moment I have a main VI which opens a dialog box (Dialog #1), and this dialog box then opens another dialog box (Dialog #2) in order to give the user a select option.
eg. Main VI --> Dialog #1 --> Dialog #2
However, sometimes Dialog #2 hides behind Dialog #1 until there is a mouse click on Dialog #1, after which Dialog #2 appears frontmost. Other times Dialog #2 appears frontmost automatically (as I would like).
Has anyone else seen this and know how to fix it?
Thanks!
03-21-2014 09:40 AM
I'd recommend only showing one modal window at a time. Not just modal dialogs, but modal VIs.
One way to easily do this is to make a dialog VI yourself, and make it non-reentrant (this is default). Now when you call the dialog VI it will show the modal window, and another place that you call the same dialog VI will wait until you acknowledge the modal dialog being shown, before showing the next one. If you must have multiple dialogs shown at once then this doesn't sound like it should be modal to begin with.
Modal to me implies an immediate response which is quick and should halt the user from doing anything until it is acknowledge. This doesn't sound like what you are doing since you are showing more then one at a time.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord