It is no more the same carrot so you can't expect the listbox to "keep" the selection on "it".
You have to save somewhere the selection before changing the list contents and then restore it. How to do it is depending on what identifies an item being "the same" after the change. In the example you give, I would save the value (not the index) of the selected item(s) and the select again the items holding the same values.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In reply to Re: Listbox keeping the selection in 1 listbox
by psini
in thread Listbox keeping the selection in 1 listbox
by renegadex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |