LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resizing a cluster (height and width) programatically

Thank you to anyone who can answer this question. Is it possible to resize a cluster on the front panel programatically? If this is possible, how may I do so? I wish to affect the cluster's height and width (or equivalent)? As far as I can tell, the height and width are read only.
Thank you again.
Nathan
0 Kudos
Message 1 of 6
(5,951 Views)
As long as i know, this is not possible.
Good luck
0 Kudos
Message 2 of 6
(5,951 Views)
Though you cannot change a Cluster's shell size directly, you can change the size of any item in the shell, which will then change the Cluster's shell size.
So, create a property node to one of your Cluster's controls or indicators and set it to write the 'Size' properties. You can then make this your programic method to resize your cluster's shell. If you don't want to affect any of your cluster's items, then create a 'dummy' transparent control and change it.
See attached LV 6 example.
Good luck with it, Doug
Message 3 of 6
(5,951 Views)
Doug,
Awesome idea. Thanks. There is one important detail that should be noted. The cluster's "Autosizing" option must be set to "Size to Fit."
Nathan
0 Kudos
Message 4 of 6
(5,951 Views)

Click the cluster so it's selected. Then right click and go too Advanced >> Customize. There you can resize the cluster and any of it's elements and then save to apply the changes.

0 Kudos
Message 5 of 6
(4,617 Views)

You can set a cluster size.

 

There is a scripting property called Cluster Size that does this.

Cluster size.png(the snippet messed this up a bit)

 

There's also a LabVIEW exe export function that scales all FP objects.

 

This will scale the cluster, but not the things in it... Usually, this is just the first hurdle in a long line.

 

I've wrapped this up in a library, that does a bit more. But at the hard of it, the export function is used. See https://github.com/Carya-Automatisering/Dynamic-Scaling, and the accompanying presentation. It's MIT licensed, and donationware.

 

Message 6 of 6
(4,609 Views)