05-26-2011 03:40 AM
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
Solved! Go to Solution.
05-26-2011 03:49 AM
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.
05-26-2011 04:43 AM
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...
05-26-2011 04:58 AM
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 thingy
05-26-2011 05:04 AM
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.
05-26-2011 05:44 AM
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