LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting the contents of a listbox

Here is a real LabVIEW challenge: Sort the contents of a MULTICOLUMN LISTBOX after clicking on any of the column headers. I have no trouble doing this for a TABLE, because there the edit-position can be read through a property node and action is taking accordingly. In a listbox this is not available.
0 Kudos
Message 1 of 3
(3,978 Views)
hey Peter, indeed I don't think there is a possibility of capturing this kind of event. You best overlay transparant controls over the headers to capture the mouse down event of a header. Once you have that, you can use the item names property node to read the content into an array, manipulate the data, and write it back to an item names property node. An additional advantage of this will be that you can also implement the cool little arrow the symbols ascending/decending.
Are you Dutch?
0 Kudos
Message 2 of 3
(3,969 Views)
you can do that using methods. If you click the header you get the column index. Try this vi
0 Kudos
Message 3 of 3
(3,962 Views)