
| Subject: | Need good scrollable container for dynamially-created vcl UI elements |
| Posted by: | Frank Burleigh |
| Date: | Sat, 31 Jul 2010 |
I have an older app (last compiled with Delphi 2007, I'd guess) that builds part of its UI dynamically. It decides what UI elements to build based on a data structure it reads. Think of it like an ad-hoc query builder: the app learns the query fields it must present, picks a reasonable presentation for that type of field (e.g. select one date), then creates and places the UI elements needed for the presentation the app's selected into a UI container.
As examples: a date range needs two date selection edits; "pick one option from a finite list" is a radio group; "do this: yes or no" is a check box. "Add a string to a list, and search for any string among the list" needs an edit box, a list box, and buttons for add to list and remove from list. Of course labels also have to be created, placed, and populated.
My question is this: then, I used a TScrollBox because it was the only container that would automagically display a scrollable interface.
But I believe that's an ancient UI element, and man does it populate slowly.
Is there a better container for this function, either in Delphi 2010 or out in the component marketplace somewhere? Or can I do a better job with TScrollBox by say disabling its display of itself until all the UI elements have been built and placed?
Advice appreciated.
PS: I once thought the old virtual list box could be helpful but its maintenance seemed sketchy and I believe it was nontrivial to learn to use (probably using MVC techniques).