LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Closing child panels

Hi,

I'm opening by reference some vis to use as dialogs and to do various tasks in my application.  When I close the main panel, what is the best way to close the children  panels.  I'm  using an events structure for closing and minimizing the child panels now by writing to the properties of the panel references..  Do I just close the references using the vi-panel-close event?

Thanks
LV 8.6 on Windoze XP
0 Kudos
Message 1 of 8
(3,630 Views)


@Clueless1 wrote:
Do I just close the references using the vi-panel-close event?


you mean the panel close node. yep! but first close front panel, and then close reference.
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 2 of 8
(3,625 Views)
What I meant is wait for an event in the parent vi.  The one called vi/panel close. 

So, from what I gather what i want to do is, using the property node of the children's vi reference, close the panel.  Then close the reference itself. Yes?

Thanks
LV 8.6 on Windoze XP
0 Kudos
Message 3 of 8
(3,621 Views)
Yes.

Failing to close the panel before closing the reference will give you  a  stopped VI with open front panel.

A VI stays in memory when either a reference to the VI is open or its front panel.

André
Regards,
André (CLA, CLED)
0 Kudos
Message 4 of 8
(3,600 Views)

generally i always do a check at cloe of main application, if there is any panel open from the vis called by reference. the reference is then used to close the panel, and only then release the reference.

if you close the reference without closing the panel, and the vi is set to reentrant, you will have trouble to close the panel, especially if there is no menu or title bar on this panel (or it is disabled).

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 5 of 8
(3,587 Views)
Thanks

I have a couple of more questions


Is there an easy way to get all of the references of all of the vi's called by reference (including grand children etc.) and is there a way to figure out if a VI is an exe, or is running in the development system?




LV 8.6 on Windoze XP
0 Kudos
Message 6 of 8
(3,560 Views)

The child can handle it in the timeout case, check callers state using call chain.  If callers (parent) state stops executing then goto the exit state of the child routine.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 8
(3,556 Views)
To answer your question about running in the development environment vs. as an executable, see the following KnowledgeBase on Determining if an Application is Running as a VI or an EXE.
0 Kudos
Message 8 of 8
(3,539 Views)