LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions for GUI for multiple interlinked lists?

I have a program right now with a data structure in it that works pretty well when it runs, but setting up the data structure to get it to run has turned into a huge pain. 

 

I've created an image that shows an equivalent to the data relationships for discussion here (I'm not posting the actual data types contained just to keep it simple but also confidential).  Here it is:

 

Node layout needed.png

The underlying data types are:

1) An array of class objects with a common parent, with a method that's basically a "Get names and types" method, producing the list of nodes in columns 1 and 2 and their links to each other.

2) An array of clusters, each cluster containing a group name from the 3rd column and an array of names that point back towards the 2nd column (if an object in the first array is either removed or has its "Get names and types" method changed to return something else, it creates the example "orphan" shown)

3) An array of clusters containing the values in the 4th column linking to the group name in the 3rd column.  (Note: It might seem like this should be merged with the 2nd array, but in reality it can't be as this array has algorithms that go along with it that can change its values in ways that can't link with the 2nd array. This list needs to be altered by portions of the program that aren't linked to the other two lists for encapsulation reasons.).  There can be "orphans" here if the group name that a value referred to has been removed from the 2nd list.  

 

#1 and #2 also have a few associated properties also linked to them that aren't important to this chart, but do need to be shown to the user.

 

The current solution I am using is not at all ideal from a end user point of view.  I basically have the 3 underlying data types each getting their own multicolumn listbox, where each row is whichever array is being referenced, with each row being the part that has the most entries.  Highlighting a row enables the user to fill out fields and press buttons to do any linking needed.  This is technically functional in that I can set up and link together all 3 arrays as I need to, but it's very unintuitive to new users.  Whenever someone new wants to use the program I basically have to give them a 1-2 hour introduction to it followed by checking their first half-dozen or so setups for mistakes.

 

Ideally I'd like to be able to present the information in a way that is very close to the diagram of the data structure I made above, but with interactivity.  For instance, if I click on Object_5 on the right side, I'd want to highlight it, display some additional properties in interactive fields off to the side, and highlight all of the nodes it connects to "downstream" of it.  Similarly, I'd want to be able to click something in the values column on the far right and be able to highlight all of the connections and nodes "upstream" of it, and display a different set of properties to edit.

 

I've been trying to think of a good way to display this with LabVIEW built-in controls and I haven't been able to come up with anything suitable.  The lists could be potentially quite long (30+ objects in column 1, between 0 and 25 name/type pairs for each one, though most will tend to be in the 3-8 range).

 

Tree controls wouldn't work because of the need to show the orphans and the crosslinking between columns 1+2 and 2+3 not being compatible with it.  

 

Because of the potential length of some columns, the notion of creating a front panel and just moving a bunch of pre-made controls around on it programmatically means that I would have to create and manage an absurd amount of them and could run out if I don't make enough in advance (since they can't be created during runtime).  Plus it would involve a lot of manual manipulation of decorations on the front panel to link them all together.

 

I also considered making a large image map and basically writing the GUI so it would create the diagram and respond to clicks in it, but this seems like it would probably create a buggy mess that would be a nightmare to maintain (I did create one of these for a program years ago that was a much simpler data structure).

 

Right now my best idea is to investigate using a .NET or ActiveX control embedded in the front panel, but that ties it to Windows in ways that I would prefer to avoid if there's a better way to keep this all in LabVIEW.  So... suggestions?

0 Kudos
Message 1 of 1
(1,651 Views)