Component for recipient search and management

Hi all,


I have an app used to send some files to one user identified by some name. Now I need to provide the ability to send the same files to multiple recipients at the same time. What I need is a search within some names, a way to choose one of the search results, something which shows the already chosen recipients and a way to remove a chosen recipient, simply because it was chosen wrongly by accident. Currently I'm using a default ComboBox with AutoComplete, AutoDropDown etc. enabled and the default behaviour of searching/filtering and choosing one recipient is already enough for me.

So I had a look at what TMS Component Pack provides me and found that there's a lot of components which could be used in one way or the other at least for some of my requirements, there doesn't seem to be the one component combining all of those.

What I would really like to have is a combination of AdvDualListBox for choosing, showing and managing the chosen recipients with some filter logic like is used by AdvListBox: Whenever the user types some string, the possible recipients are filtered by this string and the default behaviour of AdvDualListBox is used to chose recipients. Ideally the same for the already chosen recipients as well, because those could be 10 and the user doesn't want to scroll, but search the chosen recipient directly. So two search inputs and the filter logic of AdvDualListBox is needed. Sadly, this can't be achieved by design time properties or Live Binding.

As an alternative I thought of was simply using some buttons to add and delete new ComboBoxes as needed by the user, each containing one chosen recipient. Some grid layout, with one ComboBox and add/delete buttons per line and then as many lines as are needed by the user. But I would like to avoid dealing with GUI controls dynamically at runtime this way.

As third alternative, I thought of AdvListEditor, because it already behaves like JS TokenInput I use in some of my web apps. But sadly again, I can't seem to configure it in a way that there's only one item per line, spanning the whole line and expanding to more lines only as needed. I always want to have exactly one "column"/item per line only. Additionally, I don't need any free text input, the component should only work with the provided lookup data. The current default behaviour seems to be too flexible for me and can't be restricted to my needs. :-)

But as some multi recipient/user selector seems so standard to me, I would like to ask for your hints, if I've simply missed some components which already implement my requirements? And if not, do you have any advice for me for easier implementation, especially for my DualListBox or ComboBox-things?

Thanks a lot!

TAdvDualListBox and TAdvListEditor are two quite different controls, already from the perspective of screen estate being taken. I understand that also in the case of TAdvListEditor or combobox, you want that the vertical space taken by the control grows as the number of selections grow?

As we don't have a filtering capability on TAdvDualListBox, perhaps dynamically managed TAdvComboBox instances in a TScrollBox or a TPanel that grows its vertical size might be the obvious choice. Sadly, we do not have at this moment a control available that has all this functionality already embedded. 

Bruno Fierens2016-01-22 09:46:27

Of course, I just remembered the concepts I used in the past and one of those was very close to AdvListEditor, like in the following screenshot:

Example screenshot for JQ-TokenInput


This would provide all I need: Some search, each chosen recipient could be deleted again etc. It just looks much better this way than the default behaviour of AdvListEditor.


Not necessarily, what I want is lines vs. columns, yes, but only to some extend and afterwards it's perfectly fine for the user to need to scroll.


And it doesn't seem to be quite easy to add some... Maybe you want to rethink the accessibility of the both internally used lists in AdvDualListBox? I thought of extending the AdvDualListBox, internally using two AdvListBox instances instead of the originally used DualListBox and providing some glue to make AdvListBox work as DualListBox. But there seem to only be read access to the internally used lists and I can't replace them completely.


Sounds easier like getting filter logic into AdvDualListBox, right? OK, so I guess I prefer this solution as well.


But you at least have all the parts needed, that always helps. ;-)

Yesterday evening I additionally recognized that AdvSmoothListBox has nice filtering capabilities and already supports buttons on items, which makes choosing and deleting recipients much easier, like with an AdvDualListBox. So I would "only" need to use two of those for choosable and chosen recipients and connect them using their item event handlers...

Maybe that's an interesting use case for you as well, something like AdvSmoothDualListBox?