Do you have a way (f.ex. in TAdvListBox) to hide individual items, without affecting the index numbers? Ie., if I have 4 items (index 0-3) and I hide index 1, then I still want to access the last one as index 3 (and for that matter access index 1, but it’s visible property is false).
Optimal interface would be a property on the ListBox Visible[Index] : BOOLEAN that could be toggled at runtime (and the ListBox would then adjust its display). Combined with a BeginUpdate and EndUpdate I could then implement an advanced filter to toggle display of items without needing to have an off-listbox copy of the items (they would still be in the ListBox.Items but some of them just wouldn’t be visibly rendered).
TAdvSearchList with filtering to hide items
But does it persist the original indexes? Ie., if I navigate downwards using keyboard and have the 4 items in the .Items list and have hidden #3, I then get AdvSearchList.ItemIndex=0,1,3 in my OnClick event? Also, IIRC, that component does the filtering based on string search. I need a user-callable ItemVisible[Index] property, since my need may be other that text matching. Can it do that? Does it have such a property, or a callback that I can hook into that allows me to return Visible state for an item?
There is at this moment not a Visible property per item. Hiding in TAdvSearchList is only possible via filtering.
If you want to hide items and access items with their orignal index, a possible solution is to use a single column TAdvStringGrid. With grid.SuppresRow() / grid.UnSuppresRow() you can hide / unhide a row without affecting the indexing.