LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

choose a table cell into which a value is entered from a keypad

I have a touch screen application (just using a touch-screen monitor with a standard PC application) I'm developing where an analyst builds 2 arrays of elements from 2 Periodic Tables of Elements.  Those arrays then feed a table, as shown on the front panel image. I am already using event structures. What I want to do now is include code so that the user can select a cell in the table, and enter a value there, using the virtual; keypad I've created.  I have it set up so that there is an onclick event to capture when the user clicks on the ENTER button of the keypad.  At that point, I want the value shown in the "Number" display to be inserted into the table in the active cell.  So far, I cannot figure out how to allow the user to click a cell with their finger and then have the value entered at the Keypad inserted into that cell.  I know it sounded simple when I started, but I can't seem to find the right combination of function/property node.  Any suggestions are, as always, greatly appreciated. 
0 Kudos
Message 1 of 5
(2,381 Views)

Try this...

 

I used to shift register to hold the current table position.

 

 

I don't have a touch screen, so  you must point to the table position with your mouse and left click.  If the table doesn't have focus, you have to click twice.
Message Edited by vt92 on 03-09-2009 12:38 PM
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 5
(2,364 Views)
VT92, I tried to incorporate your code into my app and I discovered that whenever I entered a value into a new cell in the table, it deleted the value from the last cell.  Initially, I thought I'd done something wrong, but then after troubleshooting my code, I went back to your example, and found it behaves the same way?  Is there something I'm missing? 
0 Kudos
Message 3 of 5
(2,331 Views)
Yes, that is the behavior. My code wasn't intended to be a complete solution, but rather a "jumping off" point for you. If you wire the updated table array into the shift register, you will retain your old values.
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 4 of 5
(2,316 Views)
VT92, thanks for all your help, but especially for the Pascal quote at the bottom.  I too am a believer, and that quote was EXACTLY what I needed EXACTLY when I needed it.  God Bless
0 Kudos
Message 5 of 5
(2,304 Views)