07-23-2014 02:19 PM
Hi,
I am trying to write code that will allow the user to select or delete array elements from one array into another array. i.e choose which files will be used in some later analysis. The select works ok (using mouse to select from the "available files" array), but my delete section requires an extra mouse click before updating the "trials to use array", this causes a lag.
I really can't see why the two events are handled differently in terms of updating the "trials to use array".
Please help!
Thanks
Graham
Solved! Go to Solution.
07-23-2014 02:48 PM
Graham,
Add an event case for the Stop button Value Changed event. Use that to stop the loop. The way your VI is set up two events are needed after Stop is pressed before the loop exits. Turn on Execution highlighting and watch what happens to see why.
Also, the typical Mechanical Action for Stop buttons is Latch When Released.
Why not use a listbox for Available Trials with SelectionMode set to 0 or more items? Its output is an array of the indexes of the Item Names.
Lynn
07-23-2014 02:57 PM
You need to set the array element keyfocus property to false for the array that you are clicking on.
Mike...
07-23-2014 04:36 PM
I've done interaces similar to this. Trust me, list boxes will make your life so much easier and they are much more intuitive for your user. You can even do a drag and drop between listboxes. You should also remove items from the Available when it is moved to the "to use".
07-24-2014 07:56 AM
That's superb! Thank you all very much.
Here's my quick version 2. I haven't tried deleting from the "available" list or drag and drop because I don't think they are needed. But in the true spirit of LabVIEW forums, I'll be interested to see how this code can be further simplified or improved.
Graham
07-24-2014 08:43 AM
I would replace the Trials to Use value change event with a Double Click event. The Row event data node will tell you the item that was double clicked. The results will be an interface that will work more like people expect things like this to - and will be required if you plan on implementing arrow buttons to match the decorations you have on your front panel.
Mike...
12-13-2018 07:40 PM
Dear sir,
Please help in this case
suppose i have data
112233 | 1 | 2 | 3 | 4 | ||
112233 | 2 | 3 | 4 | 5 | ||
112233 | 3 | 4 | 5 | 6 | ||
112233 | 4 | 5 | 6 | 7 | ||
112244 | 5 | 6 | 7 | 8 | ||
112244 | 6 | 7 | 8 | 9 | ||
i want to delete "112233 4 5 6 7 " by selecting row.
or can we delete row by selecting checkbox.?.
need your help.
Thanks,
james Tan