There doesn't seem to be a ListBox or ComboBox style or property that allows one to have or filter a unique list of items (can you or anybody else find any references ?).

One solution I found revolved around simply purging the array of duplicates before the list was populated. Heres that link:

One solution

Im going to keep looking and thinking about this one though. For the second question - automatically scrolling and selecting items as they are added. Well - for a listbox that is not sorted, you can always set the ListIndex (current selection) to last item in the list.

Assuming you have a ListBox called ListBox1 and a CommandButton called CommanButton1, heres the code for that:

code:
Function CommandButton1_Click()

$ListBox1.AddItem(RND(9))

$ListBox1.ListIndex = $ListBox1.ListCount - 1

EndFunction

For a SORTED ListBox - its a whole new story - this was discussed and the problem demonstrated in the 4TH post of this thread :

Topic: Kixforms: Version 2.0.5 Build 33 Heads Up

[ 21. September 2002, 18:12: Message edited by: Shawn ]