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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine specific row in table clicked on

Solved!
Go to solution

Hello -

 

I need to determine the specific row of a table control that is right-mouse-clicked on.  I think this is only possible by using the Shortcut Menu Activation? event for the table control and obtaining the vertical coordinate in the Coords filter options. 

 

table-control-event.PNGtable-control.PNG

 

This entails performing experiments to determine the vertical range of each row in the table, or perhaps by determining the width of one row and using a linear relationship to determine the possible range of subsequent rows.  Do you feel this is the best strategy or is there possibly another easier way to obtain this information?

 

Thanks,

 

Don

0 Kudos
Message 1 of 4
(2,944 Views)

Pop up on the Table and CREATE INVOKE NODE for POINT TO ROW COLUMN.

Place that node on your diagram.

 

Feed the COORDS cluster to that node, and out comes the row and column you clicked on.

 

Be careful of edge cases, I don't remnember exactly, but if you have scroll bars visible, you might have to take them into account.  Use the IN BOUNDS output

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 2 of 4
(2,940 Views)
Solution
Accepted by topic author DonRoth

You can use the CtlRef with the Table Point to Row method to get the information.

 

Ben64

 

getRow.png

 

I was too slow to answer ...

Message 3 of 4
(2,936 Views)

Awesome.  Thanks to you both.  I should have checked for invoke node methods.  I for some reason got stuck on filter events.

 

Don

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