09-17-2013 06:50 AM
I think I haven't well understood how to accomplish this.
What I want to do is to make a "user control" (aka "custom control", or "composite contro", I don't know which terminology NI uses), that is made of MORE THAN ONE control.
For example: I want to define a control made of a enum and a boolean check box (take the system ones, that's fine).
Appearence is fine.
Then I want to save this composite as a single "unit", a file .ctl maybe.
Its "type" under the hood would be a cluster of enum + bool.
Finally, whenever I need it, I could simply drop it on the front panel, having the cluster data type on the wire diagram.
My questions are:
1) How to do this with LV 2013
2) How can I "instantiate" this. I mean: is it possible to define a generic "enum + bool" (or ring text + bool) like in any programming language? When I define an enum in labview, I am forced to define and instantiate the element of an otherways empty enum/ringText.
How can Labview separate the concept of "data type" from the concept of "instantiation of a datatype". To me, LV collapses the 2 concepts.
Thanks.
Solved! Go to Solution.
09-17-2013 07:04 AM - edited 09-17-2013 07:19 AM
Cluster
File, New ... custom control. Drop a cluster, add the enum and boolean to it, define the items in the enum and save it.
"Instantiate" it similar to the way you add any other control to the Front Panel, except you need to get it from where you previously saved it:
09-17-2013 07:48 AM
Thanks, how can I make the cluster border transparent? Which kind of cluster should I use? modern? are they all the same?
I don't want the user to see bezel, and the cluster 3D border effect uses some pixels
09-17-2013 08:33 AM
You can edit a Classic Cluster by clicking this button:
It'll look like this:
Use the Paint tool: to color the cluster's border transparent (right-click on the border): .
09-17-2013 08:50 AM
You can use the same trick to make a Modern cluster completely transparent.
Using the Paint tool, you will color the border and the background separately.
The trick is that when painting the border, you must right click and then use the Spacebar to toggle through the "active" areas (FG, BG, and Both). As you press space, pay attention to the two large squares in the lower-left corner of the Colors palette. Once both say "T", your bezel will be invisible.
You can do this from the control editor, or in the VI where you are using the custom control.