LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine the size and position of a subpanel

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

0 Kudos
Message 1 of 4
(3,572 Views)

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.

-
Amit
CLAD
Message 2 of 4
(3,564 Views)

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.

Message 3 of 4
(3,519 Views)

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

Message 4 of 4
(3,492 Views)