Does anyone know if there is a way to size a front panel based on a decoration.
e.g. I have a front apnel GUI with a flat frame decoration.
I spend a while tweaking the front panel to show only what's inside the flat frame decoration. I go back and change some stuf and have to repeat this tweaking.
It'd be cool if I could just highlight the decoration object and tell the VI to resize based on the decoration.
I tried This VI -> Panel -> Decos -> Index -> MasterRect to set the FP.PanelBounds.
It sets it to the same size as the decoration but not actually where the decoration is located, see attached VI.
Solved! Go to Solution.
You could try using the position property of the decoration to move it's position to 0,0, which should line up the top left corner
You need to set the origin of the pane of the front panel as well.
But like Ian was saying, it is probably better to design your front panel and your decoration so that its located at 0,0 and placed at the upper left corner of the window.
OpenG has a VI called 'Fit VI Window to Largest Decoration' on their Application Control Palette.
Serves me right for getting distracted.
Thanks for the support guys,
I thought the openg option would be the handiest but it throws up the following error:
Error 1 occurred at Property Node (arg 1) in Fit VI window to Largest Dec__ogtk.vi->OFSO2 Fibre Delay Lengths.vi
LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @. ========================= NI-488: Command requires GPIB Controller to be Controller-In-Charge.
Property Name: Front Panel Window:Panel Bounds
It fails at the last property node FP.PanelBounds with inputs Left: 402 Top: 249 Right: 778 & Bottom: 709
I had the same problem, and in my case it was because the "Minimum Panel Size" in VI Peroperties/Window Size was larger than the largest decoration. I changed it to anything smaller, and the error was not thrown anymore.