LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a color box indicator transparent?

All, I would like to make a color box, which is part of a cluster in an array, transparent programmatically.  Instead of appearing transparent, it shows up with a LARGE "T" inside the color box, with a white background.  Because it is part of a cluster within an array, it will not work to use a property node... and because I would like to programmatically change the color, having it permanenty transparent (as proposed on another discussion topic) will also not work.  Can someone please help me turn a color box transparent programmatically?

 

Thanks.

 

Anthony

0 Kudos
Message 1 of 20
(10,793 Views)

I ran into this in the past, I did not figure a way to remove the 'T" but did come up with a workaround (not quite as felxable)  I mad a picture box with numerous colors and one transparent picture in it.  I didnt get 2^24 colors but did make a 16 color + transparent version which did the job well.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 20
(10,761 Views)

falkpl wrote:

I ran into this in the past, I did not figure a way to remove the 'T" but did come up with a workaround (not quite as felxable)  I mad a picture box with numerous colors and one transparent picture in it.  I didnt get 2^24 colors but did make a 16 color + transparent version which did the job well.

 


 

Very clever Paul!

 

Kudos for sharing that idea.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 20
(10,754 Views)

Another method is to use the background color from the System Label.  This morphs itself to whatever color/gradient is behind it, becoming effectively transparent.  Getting this "color" into a color box is tricky, however, since you can't select it.  You have two choices:

  1. Set the color box to 16777271, the hard-coded value for this "color". 
  2. Drop something you can color onto the block diagram (I used a Waveform Chart).  Drop a System Label onto the block diagram.  Use the color picker to get the background color from the System Label.  Color the object you previously dropped (I colored the chart area) with the color.  Now use a property node to fetch the color from the object and set the color box.
I would recommend method 1 for practice and method 2 to find out what to use for method 1. Smiley Wink  Note that this method will not make the colorbox truly transparent.  It only works if you have a smooth background color.
Message 4 of 20
(10,729 Views)
Using property nodes cant be done in this case since the cluster is in an array and unfortunatly all property nodes must be the same for all elements (never found a work around for this).  I have found myself many times thinking to use a property node to change one elements property only to me reminded when I run the app that all elements change together.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 5 of 20
(10,714 Views)

In my above example, the property nodes are only used to find the color (16777271).  The colorbox itself can be set in any fashion at that point, so will work well in a cluster in an array.

Message 6 of 20
(10,678 Views)

That is indeed an interesting trick.  Thanks I misunderstood where you ware going with the property node.  Strange that the U32 and the colorbox values are different in there display inside of a colkorbox indicator.  I will have to remember this one.  Thank you.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 7 of 20
(10,674 Views)
The problem is that arrays of clusters cannot be passed into property nodes as falkpl has previously said. The attached jpeg shows how you would programmatically break the arrays into cluster, into elements, and then manipulate that color box to a transparent one. The T within the white color box indicates transparent though. If you were to attached that to a color attribute then you would see that object disappear (well I guess not since it's transparent Smiley Wink )
Message 8 of 20
(10,646 Views)

Hi G-Money, this is the problem, the color box DOES NOT disappear in LV 8.6 when you wire a Transparent (like your T) into the cluster... your front panel will show a big T in it.  I believe this is a LabVIEW bug that should be investigated...

 

In the meanwhile, I have used Paul's response as a work around, thanks for the input Paul!!

 

Anthony

Message 9 of 20
(10,641 Views)

I think I now understand colorboxes (I have worked with labview for over 10 years and am still learning).  A colorbox is a strange implementation.  I always thought that it was a RGB low 3 bytes colormap and all bits set would be a special transparent color, BUT I WAS WRONG.  2^24 (24777216) is mapped to a special color White with a T in it.  The values above 24777216 are used for additional special colors including a transparent value (24777271) other special colors in this high bit (>2^24) region include system colors.  Now I just need to figure out how to exploit this new info.  Can this area be used for better color skinning of applications like matching XP and Vista color schemes? Make special alarming colors or anything else?

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 10 of 20
(10,628 Views)