Lazarus

Programming => General => Topic started by: RedOctober on October 18, 2019, 05:50:22 pm

Title: Best way to display .Jpg images in a "Gallery"
Post by: RedOctober 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.

Title: Re: Best way to display .Jpg images in a "Gallery"
Post by: wp on October 18, 2019, 06:24:14 pm
TinyPortal © 2005-2018