LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I order of preference floating VI's?

Hi, Was wandering if there is anyway I can set VI's up in order of preference for floating windows, basically i have a VI that I want to be able to float infront of another VI when it is callled, but while it is called I would like to be able to press a button on the VI below, I then have the requirement to open another VI up which again I wish to now have at teh forefront but be able to access the two VI's vbelow without them ever overlapping the top window VI, becuase if it disapears behing one of them the user just thinks teh program has hung. I dont want to set any of them as model becuase i want to be able to access other front panels. all help welcome best regards
0 Kudos
Message 1 of 4
(3,002 Views)

Yes on the main application keep a reference to all floating window vis.  In the event where you want to order the vis you can use the IsFrontmost property of the vi ref to pull a specific window to the front.  There is no zorder in labview but you can atleast specify that a vi is to be frontmost.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 4
(2,985 Views)
That is what I am currently doing, but what I need to happen is the actual window always stay above the other windows. wheras with that method you can still bring other windows to the front but you are unable to actually keep them in order unless they are modal which is not what I would like. Any ideas?
0 Kudos
Message 3 of 4
(2,973 Views)
There are ways to do this but it can get complex.  If the caller (Main) window is modal and the sub windows are floating then the sub windows will always float infront of the main window.  You can use the is frontmost to force the order of the floating windows using either a "windows manager vi" (I have implemented one in the past).  The windows manager will keep reverence to all floating windows and periodically reorder and move the windows to achieve the desired tiling, stacking or overlap prevention that you need to achieve.  This is all possible but is not the quickest to implement.  I have implemented a awindows manager to work like a MDI application interface (One main window "Modal VI" and multiple child windows "Floating vis" which were restricted to the defined workspace).  You could also go the route of User32.dll but I wouldn't.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 4
(2,966 Views)