Hi Gelb,
Glad to hear you've got it working

I realised afterwards that my code will not work correctly if the last line is partially hidden, ie the list box does not display an exact number of lines. So I've added a +1 after the array size function to correct this, see attached vi.
You'll notice that I read the NumRows property of the listbox - I've done this so that if you decide to change the listbox height the code will still work without you having to go in and change anything. In your code you would have to change the constant (currently a 7) before the comparison primative to the new height. Also, in my new vi I've assumed the listbox height isn't going to change during the time it gets populated so I've move the NumRows property out of the for loop and read it only once - saves a bit of time
Using a for loop with auto indexing rather than a while loop also means that I don't need to index the input array every time or worry about when the loop will stop.
Hope this all helps
Dave
Message Edited by DavidU on
06-26-2008 08:59 AM