Author Topic: Best way to display .Jpg images in a "Gallery"  (Read 408 times)


  • Sr. Member
  • ****
  • Posts: 326
Best way to display .Jpg images in a "Gallery"
« on: October 18, 2019, 05:50:22 pm »
I have to display about 30 photos as thumbnails, to allow the user to select a few at random, (using Click, Shift-click, or Ctrl-click) to be sent to an external app for closer examination of the full image.

In Delphi, I hand coded a TImage inside a TPanel (used to make an orange box outline to indicate "selected"), and that was inside another TPanel (which completed the "image box") then I generated one of each of these assemblies for each photo, then programmatically laid them out inside a TScrollBox kind of like the image gallery on an Android phone.

This was a ton of work, and although it did what I wanted, I would not call it "elegant". 

My question is: 

Is there a simple way to display discrete image files from disk, as a gallery of thumbnails, that is already built?  Maybe something that involves a FlowPanel?  Or are there other ideas you have or methods or components you've used that are just simpler for this, what I suspect is, a very common task?

Thanks in advance for any help you can provide.


  • Hero Member
  • *****
  • Posts: 7382
Re: Best way to display .Jpg images in a "Gallery"
« Reply #1 on: October 18, 2019, 06:24:14 pm »
« Last Edit: October 18, 2019, 11:05:20 pm by wp »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...


TinyPortal © 2005-2018