From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Grayed out controls don't implement transparency properly

Hello,

 

I ran into an issue similar to this one:

http://forums.ni.com/t5/LabVIEW/Transparent-image-shows-when-grayed-out/m-p/649044#M299537

 

When a control with a transparent background is grayed out, it seems to show through to the VI background regardless of what is behind the control (I'm in LV 2011 still, but can upgrade if this is fixed in 2012):

 

Disabled_Grayed_Test.png

 

 

Because of this I have to be cautious with graying out buttons which are on top of images (which I am essentially using for effects like gradients and rounded corners). 

 

I know I could always make extra controls and show/hide them like RavensFan suggested in the other thread.  Another workaround would be to make the VI's background color match the color of the image beneath the controls (but this only works for a single color so I can't use it for my entire front panel where I have different colored background images, nor can I use it if the control is on top of a gradient background image).

 

 

These workarounds add complexity that really shouldn't be necessary.  Has R&D looked into this yet (4I498U1W was a number posted in the other thread, is this a CAR ID?)?  Any chance that this will be fixed or is it just something I will have to deal with?  Are there any other workarounds that I haven't mentioned which might be more favorable?

 

 

Best Regards,

John Passiak
Message 1 of 4
(2,572 Views)

It is the same effect in LabVIEW 2012.  Currently we can only offer the behavior you are looking for on non rounded edges.    

Regards,

M. Whitaker
ni.com/support
0 Kudos
Message 2 of 4
(2,544 Views)

Thanks for the reply.  

 

Upon further testing, the problem exists to some extent even for controls with square edges (and thus no transparency in the image):

 

Disabled_Grayed_Test2.png

 

 

With or without rounded corners, the entire control takes on the color of the background rather than the color of the image behind the control when grayed out.  I don't believe there is a way to set the color (setting the image would be even better) of a grayed out control (there is another thread on that topic) other than by tweaking the control/background colors individually.

 

The problem just seems more noticeable on controls with transparent backgrounds since the background comes through completely where the transparency is supposed to be (and if I'm using transparent backgrounds, it's because I explicitly want whatever is behind the control to show).  The labels with transparent backgrounds have the same problem (I don't use them anyway in my particular UI but I could see how this would be very annoying to somebody who would want to use labels).

 

 

I guess one could make the claim that a grayed out button doesn't necessarily have a well-defined behavior that works in all cases, but if users could customize their grayed out buttons that would fix this problem.  Even though non-rounded edges don't require any transparency, I still would argue that I can't achieve the behavior I am looking for (which is to blend the button with the color of whatever background image it is on top of).

 

 

Anyway, I've gone a different route and decided not to gray anything out but rather contain "situational" inputs within tab controls (I think it works out better for my particular application anyway).  I hope this feedback is still helpful.

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 4
(2,522 Views)

John,

I have recreated your issue in 2012 and see how it can be problematic depending on your application.  I will report this issue to R&D.  Thank you for bringing this issue to our attention.

Regards,

M. Whitaker
ni.com/support
0 Kudos
Message 4 of 4
(2,493 Views)