05-25-2015 01:43 PM
Hello,
I started working with new advanced techniques, like spawning clone floating windows, setting parent levels and save/load these configurations. I know that labview doesn't have the parent funcionallity embedded, so I use usr32.dll commands.
My application consist of a main window which spawns several different controls, in form of specialized front panel VI's, and also spawns containers, which can be used to organize these controls as parents. I can save/load all these configurations, including window positions.
The problem is: FP.winBounds doesn't update its values when its parent had moved.
If the user spanws a control window inside a container, then move the container without moving the window control, FP.winBounds doesn't update. If the user saves the configuration at this point, the position values for this particular control window will be saved wrong.
I understand that this property is updated only when the front panel window of the control window changes, ie, when the user moves or resizes it, much like a user event control.
My question is: Can I force labVIEW to update this value with something similar to signaling property?
Thanks in advance,
Giovanno
Solved! Go to Solution.
05-25-2015 02:39 PM
I don't know of a way to force such a change, no.
I have a program with 8-10 different windows, and I save them when the user quits, and restore them on next run.
I use FP.PanelBounds, not FP.WinBounds. I have no such trouble.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
05-26-2015 12:45 AM
I can't say I tried anything like this myself, but here are a couple of immediate options which come to mind:
05-26-2015 06:44 AM
Turned out that the problem was easier that I thought. I used a case to write in the position variable only when the graph window was moving and the container, no. It probably would fail if the user could move both windows at the same time, but I believe that it will never happen 😛
Thanks for the help!
05-28-2015 12:37 PM
Oh yeah parent child stuff can be fun. Here's a few of the experiments I've done
Inserting Notepad into a front panel and controlling it.
http://screencast.com/t/LjlkYzTWKr8J
http://forums.ni.com/t5/LabVIEW/How-to-run-an-exe-as-a-window-inside-a-VI/m-p/3113729#M893102
Creating a "Multi Panel Interface" with spawning VIs, and tabs.
http://screencast.com/t/P9SJ1anR
https://lavag.org/topic/17046-multi-panel-interface/
I never actually used it on a production program but I always wante to clean it up and release something official.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord