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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the corresponding table row selected when click on one of the table cells ?

I am trying to make an entire row of a table (set in Hot mode) to become selected if any of its cells are clicked. What I'm seeing is that the SetTableSelection just doesn't do what it's supposed to do. And I don't want to click the row  label to select the whole row.

In addition, I want to make the selected row highlighten in color "blue" rather than in color "black" if the background color of the row is originally "white".

The questions are as follows,

1) How to make an entre row of a table  (set in Hot mode) to become selected if any of its cells are clicked ?

2) Hhow to change the color of the highlightening row of the table ?

0 Kudos
Message 1 of 4
(4,482 Views)

see here

0 Kudos
Message 2 of 4
(4,477 Views)

I have used this method, but it still has problems.  SetTableSelection doesn't work if the event is EVENT_LEFT_CLICK. If I use the event EVENT_LEFT_CLICK_UP, then SetTableSelection does work. But the response process is that at first the specific table cell is highlighten, and then the entire table row is highlighten subsequently. You can see the process clearly, but what I want is that the cell and the entire row are highlighten simultaneously.

0 Kudos
Message 3 of 4
(4,472 Views)

Are you sure that you are swallowing EVENT_LEFT_CLICK after you set the table selection?

0 Kudos
Message 4 of 4
(4,414 Views)