LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXG-Style LED front panel graphics issue

Solved!
Go to solution

I just ran into this using an NXG-Style boolean indicator (LED): when I first load the front panel of the VI, the indicators look smooth and round, with properly anti-aliased edges. As soon as I change the state of the indicator, either while running or in edit mode, the edges of the indicator become jagged and stay jagged, regardless of the value. They won't go back to smooth unless I change the state of the VI (Running to Edit, or Edit to Running), OR if the indicator is on a Tab control and I change the tab I'm viewing. Has anyone run into this issue before? I have tried toggling Defer Front Panel Updates around when the indicator changes states (Defer = TRUE, change indicator, then Defer = FALSE) but that hasn't worked. Selecting "Synchronous Display" on the indicators hasn't helped either. Any ideas would be highly appreciated.

 

Edit: upon further testing, this issue seems to be present with Silver-style LEDs as well.

 

 

Jagged NXG.png

 

0 Kudos
Message 1 of 3
(752 Views)
Solution
Accepted by topic author AlorZaknafein

I can't replicate this on my version of LabVIEW (2018 SP1) but I do remember hearing about a trick that might help deal with a bad redraw, which is what this sounds like.  

 

Try putting something completely transparent on your front panel (a decoration or an indicator, i.e. something that shouldn't be interacted with), with a Z-order setting higher than your LEDs, then use the property position of the transparent control to move it on top of the LED that looks wrong.  This should trigger a full redraw of everything it covers but without anything visually appearing to happen since it's completely transparent.

 

If your users need to click on the LED then you may need to move it back off the LED immediately afterwards.  Otherwise you can probably just nudge it back and forth over the LED by one pixel each time the value changes.

Message 2 of 3
(716 Views)

Looks like just having a transparent object with a higher Z-order covering the indicator, without making it change position, is enough to trigger a redraw after a value change. Thanks!

0 Kudos
Message 3 of 3
(678 Views)