I have a VI that contains two listboxes. Both listboxes are selectable by the user. Here is how I want them to interact.
When the VI is initialized, the first listbox will be filled with data. If the user double clicks a cell in the first listbox, the second listbox will be populated by sorting the information in the first listbox a certain way. I don't think the details of how this data is sorted is pertainent here... Next, I want the user to be able to double click one of the rows in the second listbox. The element double clicked in the second listbox will be be used in another VI that will then start.
I've got my VI working such that the first listbox will populate the second listbox after the user double clicks a cell in the first listbox. I'm using an event structure to do this. Here is where the trouble starts. I have a second event structure that listens for double clicks in the second listbox, but when I do this, the program locks up. Additionally, I only want the user to be able to double click the second listbox if the first listbox has already been double clicked.
Generally, my question really revolves around how to use the event structures in this application? Should I be using two event structures at the same time? Is there a better way to do this?
Solved! Go to Solution.
No, you should probably not be using two different event structures. A single one should work fine.
Does the subVI immediately run and return? If not and you have the front panel locked until the event finishes, that would explain what you are seeing.
I've looked at your VI, thanks for your help...
Can you show an example where the data from the first listbox is sorted and put into the second listbox depending on which value in the first listbox is selected? Right now you start by puting the values from the single array into both listboxes. In my situation, the second listbox is only populated from data directly taken from the first listbox.
No, the example does not do that. It starts by populating the first listbox and when it is double clicked, it populates the second listbox. The only thing it does not do is make sure the second listbox is empty when the VI starts. Just write an empty array to it's ItemNames property.
You would need to explain exactly how you want things sorted. All I did was reverse the array. It sounded from your first post, that you were already doing that.
Sorry, I started blabbing before I completely understood your VI. I think you might have solved my problem. I'm working through it now. Stay tuned. I truly appreciate your help, especially on a Saturday night!