LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xcontrol facade close

Is it possible to close the main facade front panel of an xcontrol during runtime?  By main facade, I mean the instance that doesn't belong to any vi, but is the instance that gets edited when the xcontrol is unlocked.  It is quite annoying to have to unlock the xcontrol in order to close the facade front panel.  Thanks.
0 Kudos
Message 1 of 6
(3,917 Views)
I am not real sure what you mean. The facade vi is the main oart of the control and any time that a VI is loaded that has the control directly on the FP or has a subVI that has the control on the FP then it will lock the faceade VI. Please explain a little more or show an examle of what you are talking about.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 6
(3,908 Views)
The "main" facade as I am calling it is the instance that gets opened from the xcontrol library window during editing.  When the library is locked, this facade stays open, and is unable to be closed, and it doesn't respond to events.  This is different than the facades that are "embedded" (for lack of a better word) within each instance of that particular xcontrol.
0 Kudos
Message 3 of 6
(3,906 Views)
I'm also interested to hear solution to this issue. I try to explain issue for other words. I have edited XControl facade and I forget close facade VI. Then I set one VI to run state which use this XControl. Then this facede VI is locked to open and I can't close it. I think that better action is to close this facade vi automatically if calling VI set to run state. Why to show window if you can't probe or close it?
0 Kudos
Message 4 of 6
(3,891 Views)

SnowForest wrote:
[...]Then I set one VI to run state which use this XControl. [...]

This is not true. It's already sufficient to load a VI using the XControl.

 

Ok, and here is what's happening:

A XControl is a set of VIs and controls collected in a special library (lvlib => xctl). There are four mandatory parts:

- Facade.vi: This defines the visual appearance and the main behavior of the XControl

- Init.vi: Used for versioning XControls

- Data.ctl: The data the XControl should present as control for the VI using it. This could be any type

- State.ctl: Internal data for the XControl mainly used in the facade and subvis as for instance methods and properties

 

The facade.vi has to be reentrant since it must instanciate for each location it is used. Additionally, the setting for the frontpanel removes the title bar during runtime.

If a VI uses the XControl (so the facade), the XControl is set to run mode which will lead to all facades (regardless if they are used in a VI or opened otherwise) being displayed as defined in it's window appearance. This is the reason why the facade cannot be closed anymore as soon as any VI is loaded into memory using this XControl.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 6
(3,886 Views)
The answer I was looking for that is that the title bar is hidden by default, and that this wasn't some fancy "feature" of the xcontrol.  Checking "Window has title bar" in the window appearance section of the vi properties (in addition to the default, allow user to close window), will let you close the main facade front panel.
Message 6 of 6
(3,874 Views)