LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multicolumn listbox highlight according to content

Hello, I would like to highlight the rows according to the code but also the color to disappear when user acknowledge it. Red for error, yellow for warning and green or transparent for acknowledged ones. 

 

Do you have some idea about it?

 

Thanks

ocan_0-1605252547105.png

 

 
0 Kudos
Message 1 of 13
(2,335 Views)

Hi ocan,

 


@truskawka wrote:

I would like to highlight the rows according to the code but also the color to disappear when user acknowledge it. Red for error, yellow for warning and green or transparent for acknowledged ones. 

Do you have some idea about it?

 

You can set the cell background color using property nodes of the MCL. (Read the help to learn how to set colors on complete rows/columns. There's a recent thread on this very topic.)

You can catch UI events on this MCL to handle user actions like mouse clicks.

 

Combine both to achieve your goal!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(2,330 Views)

Hi GerdW,

 

Actually i want the entire row to be in that color. i tried, that way didnt work. 

0 Kudos
Message 3 of 13
(2,316 Views)

Hi ocan,

 


@truskawka wrote:

Actually i want the entire row to be in that color. i tried, that way didnt work. 


Then you made something wrong.

The linked thread shows how to set the color of entire rows and even discusses how to improve speed when doing so…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(2,302 Views)

When i tried it, The active one is being in that color but when a new row added it is changing, new row is being in that color

0 Kudos
Message 5 of 13
(2,294 Views)

Hi ocan,

 


@truskawka wrote:

The active one is being in that color but when a new row added it is changing, new row is being in that color


This happens when you prepend new rows!

 

I see two options:

  1. set the background color again as needed
  2. append new rows at the end/bottom instead of prepending…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(2,291 Views)

You can find my app attached. Can you take a look?

0 Kudos
Message 7 of 13
(2,288 Views)

Hi ocan,

 

please read the full help on this "ActiveCell" property to learn how to select not just the upper left cell (index [0, 0])…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(2,282 Views)

I do understand, but when a new row added, colored row is getting white again

 
0 Kudos
Message 9 of 13
(2,258 Views)

Hi ocan,

 


@truskawka wrote:

I do understand, but when a new row added, colored row is getting white again

 

Then you need to apply colors again…

 

(In your VI there is no loop, so nothing happens "again" so far.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(2,247 Views)