09-22-2017 09:27 AM
Hi,
I want to load a sub-vi to a subpanel. However in the sub-Panel I want the only thing to be visible a graph in the subvi. I know I can set Sub Panel height and width but it still leaves me the scrollbar and does not initially show the graph only. How could I solve this?
Regards
09-22-2017 09:35 AM
First fix the size of your VI to exact size of graph and save it. Using CTRL + I -> Windows Appearance you can hide scrollbars.
For better flexibility of GUI I suggest using using Horizontal and Vertical spiltters and fit control to Pane option.
Hope this will help.
09-22-2017 02:38 PM - edited 09-22-2017 02:40 PM
Amitwadje is spot on about the scrollbars.
To let the graph always fit the subpanel, I'd set the graph to fit to pane. It will fill the VI's front panel. When loaded in a subpanel, the graph will fit the subpanel.
To Make the subpanel resize to the graph is more different. You need to either get the graph's ref in the main and get it's size and set the subpanel's (with it's size property). Or pass the subpanel's reference to the subvi, and set the subpanel's size there.
09-23-2017 12:56 PM
I use OpenG's "Fit VI Window to Largest Decoration", then place a Decoration (I usually use a Raised Frame) around whatever I want to show. The OpenG functions have been around for more than a decade, and are available in the LabVIEW Tools Network through VIPM, installed by default for the last at-least-4 Versions of LabVIEW. I then "manually" size the sub-Panel (in the calling VI) to the size of the Decoration (in the called VI).
Bob "One Task, Five Different Methods" Schor