UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is an Array of Undefinded Transparent Objects Visible when Stacked?

For example:

  • Set the background color of the front panel to blue
  • Create an array and set the background to transparent
  • Create a simple string (classic), set it's colors to transparent and place it in the array container
  • Expand the array so that it shows multiple elements.
  • Set the value of the first element to a space.
  • All elements of the array will have the same transparent look.
  • Create a box decoration, make it larger than the size of the array and color it yellow.
  • Stack the array on top of the decoration
  • The transparent undefined elements are now visible with the merged colors of the background and the object it is stacked over (green).

stacked invisible array.png

Why?

0 Kudos
Message 1 of 10
(9,774 Views)

Because LabVIEW "grays out" the undefined array elements by painting over them with partially opaque background color. Arguably, it shouldn't be graying out completely transparent elements, but I think we just didn't anticipate that use case.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 2 of 10
(4,449 Views)

Christina_R wrote:

Because LabVIEW "grays out" the undefined array elements by painting over them with partially opaque background color. Arguably, it shouldn't be graying out completely transparent elements, but I think we just didn't anticipate that use case.

Another unanticipated use case, perhaps, is the grey box that appears behind the legend entry for hidden plots in graphs. In my User Interface entry I programmtically chose which plots to show, and I emply a lot of control overlays in this VI. For the plot lines that are hidden, you are presented with an ugle grey box behind the plot line symbol.

https://decibel.ni.com/content/servlet/JiveServlet/showImage/102-19921-32-25674/plot_multi.jpg

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 10
(4,449 Views)

I think I understand now. The undefined elements are a mixture of transparent and background. When the control resides on the background only then transparent + background + background = background (transparent), but when they are placed over a non-transparent object then transparent + background + object = grayed out.

My use case is creating a pinable listbox (like your GSW) as an xControl. I have an array of picture controls on top of the listbox and undefined elements are showing as grayed out.  The easy solution is to initialize the array to a large number of blank elements, but it intoduces other problems.

0 Kudos
Message 4 of 10
(4,449 Views)

Yes, that's another "gray out" rectangle. What would you like it to look like? The same as when the plot is visible?

Thoric wrote:

Another unanticipated use case, perhaps, is the grey box that appears behind the legend entry for hidden plots in graphs.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 5 of 10
(4,449 Views)

Why are you using picture controls instead of the listbox item symbols?

Gleichman wrote:

I think I understand now. The undefined elements are a mixture of transparent and background. When the control resides on the background only then transparent + background + background = background (transparent), but when they are placed over a non-transparent object then transparent + background + object = grayed out.

My use case is creating a pinable listbox (like your GSW) as an xControl. I have an array of picture controls on top of the listbox and undefined elements are showing as grayed out.  The easy solution is to initialize the array to a large number of blank elements, but it intoduces other problems.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 6 of 10
(4,449 Views)

No matter what solution is used I would expect the background to remain transparent, as set. Anything other than that is effectively a 'highlighting' of the item.

I think, in this case, the plot line and plot label text ought to be 'disabled', which would most likely involve making their foreground colours >70% transparent.


Christina_R wrote:

Yes, that's another "gray out" rectangle. What would you like it to look like? The same as when the plot is visible?

Thoric wrote:

Another unanticipated use case, perhaps, is the grey box that appears behind the legend entry for hidden plots in graphs.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 7 of 10
(4,449 Views)

A mock-up of what I mean by making the label and plot line ~70% transparent on, for example, India's plot:

plot_multi.jpg

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 8 of 10
(4,449 Views)

One method I've used in the past to get around the greyed out elements "feature" is to resize how many elements of the array are displayed.

Use the Number of Rows / Number of Columns property node to set the displayed size of the array.

(I'm assuming every part of the array except it's elements are invisible in the final front panel.)

Obviously this doesn't work for hidden plots in graphs.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 9 of 10
(4,449 Views)

@TroyK. Yes, that's what I usually resort to, but to keep the same plot colours one has to programmatically reapply, from a local store, all the plot properties whenever you change the plot order (which is essentially what happens when you remove plots from the graph). This means a lot of data handling and property setting. A shame to have to do that when we have the lovely "hidden" property.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 10 of 10
(4,449 Views)