LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating a Typedef Cluster Control

I have a control which is a typedef cluster.

 

How do I add elements to the typedef without rearranging the positions of the cluster elements in the control?

 

I can make this a strict typedef but I would like to have multiple controls using this typedef with different layouts.

 

Thanks

Nick
0 Kudos
Message 1 of 4
(327 Views)

Are you saying you want to add "hidden" elements, so the cluster has more data in it but doesn't change its appearance at all?  That would be kind of a weird thing to do but might be possible.  It's not great design practice.

 

Or are you saying you want to add new elements while keeping the old ones in the same locations?  That's pretty easy.  You might have to turn off the auto-arrange or fit to size options using the right-click menu so that you can enforce a given layout.

 

Would it be possible to upload a screenshot of the type-def as-is, how it looks when you add stuff, and then visually point out what you don't like about the way it looks when you add stuff?

0 Kudos
Message 2 of 4
(269 Views)

Put each layout in a (strict) type def cluster. Put each layout cluster in a cluster (type def or not, strict or not, doesn't really matter).

 

Now use property node All Controls from the cluster to get each layout. Use Visible True\False to show hide layouts.

 

Of course, it would make sense to make a little library or class to handle the layouts.

 

The clusters are optional. You can simply throw all controls in a type def and use references to them to show\hide them. Sometimes this might be more convenient.

 

You could also change the position of the elements. But show\hide and position have to be done with property nodes.

0 Kudos
Message 3 of 4
(246 Views)

@niNickC wrote:

How do I add elements to the typedef without rearranging the positions of the cluster elements in the control?


It's not exactly clear what you are trying to solve here.

 

Clusters have Autosize options. You should set it to Fit or None. The other two options will rearrange controls if you add them. They will add the new control to the right or bottom. 

0 Kudos
Message 4 of 4
(242 Views)