From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scale all objects on front panel as window resizes

Hello folk,

 

I am needing help with GUI. I have a waveform graph having 32 plots. I need this graph to be compressed with its plots name upon resizing the window. I have already checked box against scale all objects on front panel from VI properties. 

 

Main issue is my graph is getting resized properlly but plot names beside it does not. For reference I have attached a VI with this post. 

 

Your help will be truly appreciated. 

 

CLAD
Passionate for LabVIEW
0 Kudos
Message 1 of 3
(2,471 Views)

jatinpatel1489,

 

In this specific VI, the problem lies in the fact that if you were to scale this legend down, it would become unreadable. You could programmatically check the graph size, font size etc and either resize or remove icons in order to make it smaller or bigger based on how big the graph is. There is not way that I can find to resize the legend with the plot automatically.

0 Kudos
Message 2 of 3
(2,307 Views)

Legend:Autosize property must be set to False to play with the Legend:Size.Width property. 

 

Now if what you really want is to control the total height when the panel resizes... (And my magic 8-Ball says "Sure, That's exactly what the OP wants!")

 

Set Legend:scrollbar visible =TRUE  (This will allow the user to see any plot in the legend regardless of resizing)

 

Add an event case for "Panel Resize"

In the panel resize event case; read the new panel height, do a bit of math and set Legend:Number of Rows to the floor of panel height divided by height of one plot name in the legend


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(2,301 Views)