Reputation: 11240
I am looking for a TList descendent which lets me add one or more indexes and lets me search and view by these indexes.
A 30min google search session has left me with nothing.
This must have been needed before. I mean how many times have you had a in memory indexed collection and then needed to display it in a different order?
Thanks,
AJ
Upvotes: 4
Views: 1473
Reputation: 7575
If you are looking for a generic implementation of a Multimap in Delphi, LU RD has pointed to you the right direction in his comment above on delphi-coll.
The namespace Collections.MultiMaps provides a bunch of classes:
Upvotes: 7
Reputation: 53830
You can use a sorted TStringList for your index. While it might be nice if your index were encapsulated into your main list object, that's no reason to let it stop you.
Create a new TStringList and have the Object pointer point to whatever you need.
Upvotes: 0
Reputation: 36644
Have you considered TClientDataSet? It can be sorted and filtered at runtime. An article can be found at http://edn.embarcadero.com/article/29056
Upvotes: 7
Reputation: 4178
I'm not sure if delphi supports multiple indexed lists... Maybe you can try with TMS TColumnListBox?
Upvotes: -1