LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the LED true and false color in a webVI datagrid control

Hi,

 

How do I change the webVI HTML to set e.g. the LED in a datagrid control. True is green and False is red. Below is the default definition.

 

            jqx-led[ni-control-id='25'] {
                font-size: 12px;
                font-family: Segoe UI, Frutiger, Frutiger Linotype, Dejavu Sans, Helvetica Neue, Arial, sans-serif;
                font-style: normal;
                font-weight: normal;
                text-decoration: none;
                --ni-content-display: none;
                --ni-true-foreground-color: rgba(255, 255, 255, 1);
                --ni-false-foreground-color: rgba(43, 48, 51, 1);
Regards,
André (CLA, CLED)
0 Kudos
Message 1 of 3
(2,136 Views)

Hi André,

 

From the looks of it the color is given as an RGB triplet and so for red and green for true and false you would make the following changes:

 

--ni-true-foreground-color: rgba(0, 255, 0, 1);
--ni-false-foreground-color: rgba(255, 0, 0, 1);

Hope this helps!

 

Mitch

0 Kudos
Message 2 of 3
(2,086 Views)

Hi Mitch,

 

I've tried it, but the declaration is in the auto-generated section.

I've also tried to put a copy in a user-defined style section, but that doesn't override to prior declaration in the auto-generated part.

 

In addition there seems to be a single declaration for type LED, so I would also like to know how set properties for different LED instance on a webVIs FP.

Regards,
André (CLA, CLED)
0 Kudos
Message 3 of 3
(2,080 Views)