LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select table cell like Excel

Is there a way to modify a LV table so that when a user left clicks on a cell, it highlights the cell instead of trying to edit the cell (like what a left-click in Excel does). This seems like a simple question, but for the life of me I can't figure it out. Right now a user has to left click, select within the cell (so it highlights) then press ESC to exit the edit mode. See attached JPEG. Thanks.
 
Michael
0 Kudos
Message 1 of 5
(3,524 Views)

Hi Michael,

Yes, you can write a short piece of code to highlight the table cell when the user clicks that cell by using an event structure and table properties. See the attached image for the complete solution.

Regards,

Andy

 

Message 2 of 5
(3,498 Views)
Thanks for the response. It doesn't do quite what I want. Attached is a JPEG of what your solution does, see my above JPEG for what I want. At least in my implementation of your solution the background cell is highlighted, but the cell is still in the edit mode (i.e. there is the blinking line waiting for text). You have to press ESC in order to exit the edit mode and keep the cell highlighted. This may be something I simply need to add to the Suggestion page for NI to do.
 
Michael
0 Kudos
Message 3 of 5
(3,480 Views)
Hi Michael,
The box appears when the cell is a control that's in edit mode.  There's unfortunately no way to get rid of the box, and Andy's solution is as close as it gets.
I highly encourage you file a product suggestion at www.ni.com/contact, and R&D look at these product suggestions when they consider new features for future versions of LabVIEW.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 4 of 5
(3,459 Views)

Michael,

Try using the event Mouse Down on the Table, and set the Taple property, KeyFocus to false.

0 Kudos
Message 5 of 5
(3,244 Views)