LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard Delete button to delete row in array

Is there a way to use the delete key on the keyboard to delete a row from an array?
0 Kudos
Message 1 of 6
(3,041 Views)
I generally hesitate when answering Q's like this.

Hesitation done.

No not using a pure "G" solution.

There are some Winapi calls that let you capture key-strokes.

Search for capturing Key-strokes and you should find an example.

I believe I saw an answer from Jeane-Pierre that is related. You could look through his postings.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 6
(3,041 Views)
Another alternative is that if your keyboard has a "Clear" key you can create an onscreen button to delete the row and use the keyboard navigation to map the "Clear" key to that button...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 3 of 6
(3,041 Views)
Good point Mike.
? I can't remeber seeing a "Clear" key before. What kind of keyboard has a clear? I should start looking at the keys again.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 6
(3,041 Views)
Hi Liz,

If you are Using LV 6.1, this is easily done. There are three steps to the Process.

1. Trap the Event when the Delete Key is Pressed. With LV 6.1 Event Structure can do this and give you which Key is Pressed Using VKey Node.

2. There must be Some way that you can identify which row must be deleted. It could be a Simple Slider or Program output.

3. The Physical deletion from the Array. With 6.1 you get a function "Delete from Array" and you specify either Column no or Row No to Delete.

I have Attached a Sample VI for you to see in LV 6.1

If you Do not Have LV 6.1 then Action 1 to Trap Delete Key Stroke is not In built LV function. You may Want to get "Danny Lauers ToolBOx" I think it is available at www.openG.org

There is a Functi
on in there"Get Keys" which will tell which Key is Pressed.

Then you will have to Build Funtionality to Manipulate Array to Delete the row.

Good Luck!!

Mache
Good Luck!

Mache
Message 5 of 6
(3,041 Views)
Wonderful post Mache!

I should have hesitated a little longer.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(3,041 Views)