spaceboy Posted July 26, 2007 Report Share Posted July 26, 2007 hi, I have a list with the format: serial #, coordinate 1, coordinate 2, coordinate 3, coordinate 4 (each coordinate is a ten character string). I'd like to write a VI that enables the user to add an entry to the list and delete from it. I thought the best way to do it would be with a MultiColumn Listbox displaying the list, where the user would be able to double-click an entry to remove it. Unfortunately, I can't get the GetDoubleClickedRow invoke node to work as I think it should. If I could get it to report on the line that was double-clicked I could easily remove it. Right now the only thing it does is give me -2. The code I have right now is attached. Any ideas? Quote Link to comment
Ton Plomp Posted July 26, 2007 Report Share Posted July 26, 2007 Change your multicolumn listbox into a control. Why do you need the boolean event? Ton Quote Link to comment
spaceboy Posted July 26, 2007 Author Report Share Posted July 26, 2007 QUOTE(tcplomp @ Jul 25 2007, 09:30 PM) Change your multicolumn listbox into a control. Doesn't help. QUOTE Why do you need the boolean event? Ton Which event are you refering to? Quote Link to comment
orko Posted July 26, 2007 Report Share Posted July 26, 2007 QUOTE(spaceboy @ Jul 25 2007, 11:42 AM) Which event are you refering to? I think what tcplomp was refering to was why you didn't use the "double-click" event on the obstacles control instead of the boolean "Delete". By using the double-click event, one of the nifty values you get inside the event is "row". Also, there is no need to use a local variable to reset your Add Row button if you use a latch mechanical action and place your control inside the event that it triggers (this is good practice on any control event). Avoid the use of locals if you can help it. See your modified VI below: http://forums.lavag.org/index.php?act=attach&type=post&id=6454''>http://forums.lavag.org/index.php?act=attach&type=post&id=6454'>http://forums.lavag.org/index.php?act=attach&type=post&id=6454 Notice also that I wired the shift register through in your "timeout" event. Without this, if you established a timeout then you would lose your info on that event. Hope this helps, PS. You may want to add "8.2.1" to your personal profile. Right now there is only LV6 listed as being used. Quote Link to comment
spaceboy Posted July 27, 2007 Author Report Share Posted July 27, 2007 QUOTE(orko @ Jul 25 2007, 10:18 PM) I think what tcplomp was refering to was why you didn't use the "double-click" event on the obstacles control instead of the boolean "Delete". By using the double-click event, one of the nifty values you get inside the event is "row".Also, there is no need to use a local variable to reset your Add Row button if you use a latch mechanical action and place your control inside the event that it triggers (this is good practice on any control event). Avoid the use of locals if you can help it. See your modified VI below: http://forums.lavag.org/index.php?act=attach&type=post&id=6454''>http://forums.lavag.org/index.php?act=attach&type=post&id=6454'>http://forums.lavag.org/index.php?act=attach&type=post&id=6454 Notice also that I wired the shift register through in your "timeout" event. Without this, if you established a timeout then you would lose your info on that event. Hope this helps, PS. You may want to add "8.2.1" to your personal profile. Right now there is only LV6 listed as being used. Thanks! Works perfectly. I wish there was a voting feature here... Quote Link to comment
Ton Plomp Posted July 27, 2007 Report Share Posted July 27, 2007 QUOTE(orko @ Jul 25 2007, 09:18 PM) I think what tcplomp was refering to was why you didn't use the "double-click" event on the obstacles control instead of the boolean "Delete". I asked it because I am wondering if you understand your own code. Hopefully does Orko's answer triggers some aha-feelings for you. Ton Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.