LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A way to "Closer Afterwards if originally closed" using nodes instead of dialog?

Currently it is easy to customize a SubVI window appearance using the "Apperance Dialog Box".  But best practices asks that all properties for a VI be on the block diagram, not hidden from the developer.  I want to know if there is a property node or method that controls this behavior that can be placed on the block diagram, even if it is not editable during runtime.  I have checked, there isn't any mention of it in the help files that I can find, or another post that references a node.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 1 of 5
(2,257 Views)

I think what most people do is just open the front panel explicitly after all UI initialization is done (and this is better than using the built in setting because it avoids an unprofessional looking "flicker" upon open) then close the front panel after (or cache whether it was open at the start and then only close if not).

 

I also like to do this for modal dialogs (make them modal at the start and and un-modal at the end programmatically) because it helps reduce the problem of accidentally starting the program with a modal window open and then getting stuck.

Message 2 of 5
(2,245 Views)

Side point: This is typically not a setting that needs to be in the VI properties because it can also be configured with the "subVI node setup" in the caller, giving you more control over each called instance. 

 

NodeSetup.png

 

 

Message 3 of 5
(2,230 Views)

I missed modal on the Labview spelling test, can you clarify please?  I think it's important to the thesis of your explanation.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 4 of 5
(2,213 Views)

Modal is another window appearance setting. A VI can be set to Default, Floating, or Modal. Floating means it will always stick on top of other windows (for example, like the LabVIEW probe window). Modal means it will be frontmost and not allow you to click on other windows (similar to like a windows confirmation dialog).

 

There can be weird stuff that happens if you accidentally leave a modal subVI open when you run your application because then the subVI goes into run mode even though it's not actually running and it starts blocking you from clicking on anything else and then you are stuck. That's why I find it better to not keep any VIs saved as modal and just change that setting on the fly as it is about to open. It doesn't matter for an exe, it is just to keep the programmer sane while developing.

 

But if yours isn't a modal dialog, then you don't have to worry about that.

0 Kudos
Message 5 of 5
(2,207 Views)