In addition, there are two cases you can (and should deal with). The first is when the user selects an item and then clicks an "Ok" button or something similar to finalize the selection. In that case, the value of the control is the number of the item selected when the button was pressed. To get the text, use the value to index into the array you used to populate the property node.
The second thing is if the user doubleclicks an item. To use this you have to read the doubleclick property in your loop. In the value of this property is -1 it means there has been no doubleclicks. Anything other than -1 is the number of the item that was double clicked--which you can use as above.
Finally, it's also a good idea to initialize the value of the listbox to -1 w
hen the itemnames property is loaded. This has the effect of deselecting all items and isn't really necessary, but gives a cleaner interface and IMHO is just good housekeeping.
Also remember that although the listbox looks like some sort of text table, it's really a numeric control and it's value is a number.
Mike...