Generate container instances at runtime for desktop app

  1. 3 months ago

    Hi all - I am looking for an example as an alternative to using a listbox to display database results for a few records at a time by displaying results on container controls and generating the number of instances needed after performing a query. So if 7 records were returned, 7 container instances would be stacked with results of each record contained within. I’d like to leverage the ability of containers to include tab controllers, list boxes, etc which can’t be done inside a listbox itself as far as I know. Maybe someone has done something similar and can point me in the right direction? Or 3rd party plug-in? Thanks!

  2. Paul L

    Dec 19 Xojo Inc

    The DownloadContainer example creates a scrolling Canvas of DownloadContainers. Perhaps it could be adapted to instead be a scrolling list of DBResultContainers that are designed the way you want.


  3. Thanks Paul - this looks promising! Weird I had missed that example this whole time

  4. Edited 3 months ago

    @Paul L , In playing with the example, I think I found a bug I have been unable to resolve. Create 10 'downloads', then click 'cancel' on items 1, 4, and 5. Finally click 'Clean Up'. When the canvas re-draws, it is leaving a large space toward the top. Clicking 'Clean Up' once or twice more fixes the issue. I thought it may be a refresh issue, but several attempts at refreshing the canvas have not done the trick. Any insight?

  5. Paul L

    Dec 23 Xojo Inc

    Could just be a math problem with the code that figures out where to draw the containers. I’ll take a peek when I’m back in the offfice.

or Sign Up to reply!