From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Show VI from another VI as a popup dialog

Solved!
Go to solution

Hi there,

 

I have a beginner question. I created a VI which displays some data, and I have an Edit button to edit the selected data. When I press the Edit button, I want to show another VI, preferrably as a modal dialog. How to do this?

 

Thanks, Csaba 

0 Kudos
Message 1 of 6
(2,607 Views)

1. go to vi properties (CTRL+I)

2.Select "window apprearence" from the "categoty" drop down list box

3.Hit the "customize" button

4.Put a check mark on "Show front panel when called", "Close afterwards if originally closed"

5.Select "Modal" radio button under "window behaviour"

6.Hit the OK button.

 

 

1.GIF

 

Regards
Guru (CLA)
0 Kudos
Message 2 of 6
(2,605 Views)

OK but how to display the second VI after a click the button? I tried making a case structure, and into True I've dragged the second VI. As a result I have the second VI appear/disappear every 100 ms (because the main VI is inside a while loop with a 100 ms delay). I thought that it would appear only when I click the button...

0 Kudos
Message 3 of 6
(2,598 Views)
Solution
Accepted by topic author gcsaba2

Do you have a button wired to the case structure? Remember that the button has to be inside the whileloop also. If you have done all this I think that you have the wrong mechanical action on your button. Right-click the button and select latch when released ( I think this is the correct one. I'm reinstalling LV now otherwise I would have given you an example). Correct me if I'm worng on the switch/latch thingySmiley Happy

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 4 of 6
(2,594 Views)

That helped 🙂 By default it was Latch when pressed. I also had to add a While loop to the second VI, I somehow assumed that it will get included into the parent's while loop because it's a modal window.

0 Kudos
Message 5 of 6
(2,590 Views)

I'm glad it worked out for you!

 

Also check out this video about popup dialogues and this community group: https://decibel.ni.com/content/groups/ui

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 6 of 6
(2,584 Views)