LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

when entering data into a table enter goes to next line, can it not do that?

When i have a table in a Labview vi, when a user enters data into the table, then sometimes they press enter and the cursor goes to the next row. Is it possible not to do that (I know it is possible that it creates a new line, but i just want the cursor to go out of the table, like when you enter a number in a control)... any help welcome!
0 Kudos
Message 1 of 4
(2,992 Views)

You can do this with an event structure.  When the KeyPress notify event occurs (the notify event is the one without the question mark), you can check to see if the VKey is Enter or Return (in LV 7.1 I think they were the same code, in LV8 they are separate) and then set the keyfocus property of the table to false if it is (this will just cause the cursor to leave the control, if you actually want to have it to go another control, you could set the keyfocus property of that control to true instead).  I've attached a quick example in LV8.

 

Regards,

Ryan K.

0 Kudos
Message 2 of 4
(2,980 Views)
As a first approach, you could use a filtering event for "Key Down?" in the table, then "discard?" all undesired keys.
0 Kudos
Message 3 of 4
(2,977 Views)
Oh, thank you.I don't quite know how to do this, could you add a Labview 7.0 example?
 
DJ
0 Kudos
Message 4 of 4
(2,962 Views)