Millisecond Forums

Question about resetselection

https://forums.millisecond.com/Topic35204.aspx

By kev_dent - 2/15/2023

I have a quick question about the behaviour fo resetselection.
If I create list say with 10 items, and then use removeitem to remove 2 items, when I then subsequently call resetselection is the list reset to a list with 10 items or 8?

I am assuming 8 items since the removed items are no longer part of the selection pool.
By Dave - 2/15/2023

kev_dent - 2/15/2023
I have a quick question about the behaviour fo resetselection.
If I create list say with 10 items, and then use removeitem to remove 2 items, when I then subsequently call resetselection is the list reset to a list with 10 items or 8?

I am assuming 8 items since the removed items are no longer part of the selection pool.

> I am assuming 8 items since the removed items are no longer part of the selection pool.

Yes, that's correct.

If you wanted to return the list to its original state (i.e. 10 items), you would use list.listname.reset() instead of list.listname.resetselection().
By kev_dent - 2/15/2023

Ok thanks Dave that makes sense.