Suggestions for the Listview control

In addition to the existing methods, could you add some variations that use the assocaited data value?
GetItemByData(), RemoveItemByData(), SelectItemByData().

IMHO, that is the only user-defined identifier that is guaranteed to stay constant, since it depends on the user (names can be duplicated, indexes change when sorting, etc.).

Other nice-to-have options would be SelectAllItems() or InvertSelection(), for multi-selection lists.

Thanks for considering.

We've added these for the next update, other than SelectAllItems() which you can already do by using -1 as the index for SelectItem().

Thanks for the suggestions!

2 Likes

Hi.

How is Control.GetItemByData() supposed to work? Is it the same as Control.GetItemAt() (expects an int)?
I did a quick test, but I can't get it to work. Proof.


dlg_test.opusscriptinstall (1.8 KB)

You can see that I'm asking for a known data id, but it is never found.