ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable clicking on the main scream when the sub-VI is called

Solved!
Go to solution

Hi all,

 

When I open the front panel of sub-VI from my main window (by using SubVI Node Setup > Show front panel when called), if I click a button (or something else) on the main window, it will still work after I close the subVI window. Is it possible to completely disable the clicking on the not used window  when the sub-VI is called (two windows opened at the same time)?

 

Ian

0 Kudos
Message 1 of 5
(3,733 Views)
Solution
Accepted by IanYuan

Check the settings of the subVI to make it modal.

0 Kudos
Message 2 of 5
(3,724 Views)

Thank you so much!

0 Kudos
Message 3 of 5
(3,717 Views)

Just be careful when using modal windows.  You can get into a situation where your main and subVI are deadlocked and nothing can be done to exit.  Ctrl+. does not work.  Usually requires Ctrl+Alt+Del and you lose any unsaved work. 

 

I'm not aware if this has been addressed somehow in newer versions of Labview.

aputman
0 Kudos
Message 4 of 5
(3,648 Views)

Another option is to use the Transparency property to hide the calling vi.

Like this:

Transparency.png

This might give a cleaner look depending on the situation.

You can also do both (use partial Transparency) to make it clear that the background vi is inactive.

 

In general, I avoid Modal vis (aputman makes a good point - been there), but sometimes they are the best solution.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 5
(3,635 Views)