LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use transparency in custom Tree Symbols?

I have a graphic image that I edited (in MS Photo Editor), selected a Transparent Color for the background and saved it as a PNG file. I want to use this as a custom tree symbol.

However, the Tree control seems to ignore the transparency selection and uses a white background. Without transparency, the tree "selection" color looks goofy when used with the custom symbol.

Is there a trick to this?
0 Kudos
Message 1 of 4
(3,272 Views)
Check out the example program: Traversing Tree Controls and Setting Custom Controls and the subVI "Create Mask by Alpha.vi" in particular.
There's some transparency settings that you can set for images.
Message 2 of 4
(3,272 Views)
Thank you. The "mask" was the missing puzzle piece. I don't think I would have guessed that.

On a related note: I notice that when I set a custom icon into a tree that the image undergoes some changes in appearance. Sometimes a thin black outline appears and it just doesn't look as nice as the original image. Viewing the "picture" in LabView, prior to setting the tree, shows a fine image. But after the image is shrunk to fit into the Tree it is not as good.

Is there a reference to what operations are applied to the image prior to it showing up in the Tree?
0 Kudos
Message 3 of 4
(3,272 Views)
Hi Mike,

The only documentation for image rendering is in the Help for the VIs themselves. PNG files have been known to display a little funny sometimes on tree controls and you may want to consider reading in JPEGs or Bitmap files instead.

Hope this helps.
0 Kudos
Message 4 of 4
(3,272 Views)