LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot resize the front panel when fp is closed/hidden

I am attempting to resize the front panel of a VI before opening it.

When front panel is set to load on being called, this is how I resize:
Open App Ref
Read FP.WinBounds
Modify WinBounds
{bottom = top + new_vertical_size
{right = left + new_horizontal_size
Save FP.WinBounds

When front panel is not set to load I can resize like this:
Open App Ref
Set FP.Open = True
Read FP.WinBounds
Modify WinBounds
Save FP.WinBounds

What I would LIKE to do:
Open App Ref
Set FP.Open = False (or disable automatic fp load)
Read FP.WinBounds
Modify WinBounds
Save FP.WinBounds
Set FP.Open = True

However this last series of commands doesn't work... I just get the FP completely unchanged/not resized as I wou
ld if I were to resize it with the front panel open.

Is it possible to set the origin / window size (WinBounds) before I open the front panel? Opening then resizing means the front panel objects are visible briefly before the panel is sized/oriented correctly--is there a way to set the default start up state of the VI programatically so the user won't see what's on the fp?
0 Kudos
Message 1 of 2
(2,843 Views)
Have you tried to use the defer panel update property. Use a VI reference to a front panel property. This outputs a reference tha can be sent to a second property set to defer panel updates. This properly enables/disables the updated of the image of LV VIs on the front panel. You might try disabling the update then open/modify/set then reenabling the update.
0 Kudos
Message 2 of 2
(2,843 Views)