I do not know how you have implemented your sort but if
you make the sort in such a way that it outputs an array
of the original array indices, you can easily recover the new
index of the row.
If you have to sort an array of elements, input it in a for
loop that bundles the element with the loop index
e.g make a cluster {element,i}. Sort the outputed array of
clusters. You can recover the new index by looking
in the array for the previous index.
Jean-Pierre Drolet
Scientech R&D
"Anthony de Vries" a écrit dans le message news:
506500000008000000341A0000-986697009000@quiq.com...
> I have a multicolumn listbox filled with 6 columns and about 500 rows.
>
> I want the user to be able to click on a column header, and sort the
> listbox alphabetical
ly on that column. I've written the code for
> that, and that works. (using the 'itemnames' en 'get clicked col hdr'
> properties.)
>
> However, I also want to include the option, that when a user
> highlights a row, and then clicks on the header, that after the
> listbox gets sorted it scrolls down to the selected row.
> (So that the user doesn't have to search for it)
>
> And that's where things go wrong, because the value of the listbox
> changes to zero when you click on a column header. No I idea why it
> does that, but it's rather annoying. Can I change that behaviour
> somehow?
>
> Or any ideas how to get around it?