0

I have multiple GIFs I need to display at the same time. Current plan unless anyone can point me to a 'Gallery' type control is to place the TImages onto a scrollbox. However, I can't get the scroll box to scroll either vertically (for the multiple images) or horizontally (images bigger than the available window). It would also be good to be able to zoom/scale the images.

Thanks

Martin Moore
  • 733
  • 2
  • 8
  • 21
  • If you want this to look and feel good, you need to write your own `TCustomControl` manually, or use an existing control. Another option is to have a look at the `TListView` control, which is very adaptable. – Andreas Rejbrand Apr 08 '13 at 15:17
  • Thanks - I can't find TListview - where in the tool pallette is it? and what 'existing control' do you suggest – Martin Moore Apr 08 '13 at 16:11
  • Sorry, it's a native Win32 control. I didn't realise you were writing a Firemonkey application. – Andreas Rejbrand Apr 08 '13 at 16:55
  • Yeah - it's a real pain. I'm having so many layout issues I just wouldn't have with VCL! – Martin Moore Apr 09 '13 at 08:19
  • Firemonkey has a `TListbox` component which is what I believe Andreas was referring to. It's in the 'standard components' tab. It uses `TListBoxItem` children components which can be styles through a stylebook, or you can add other controls (such as `TImage`) to these ListBoxItem children through the projects object tree. You will have to turn off the `hittest` property of the images if you want scrolling to be smooth. Alternatively, you could use one of the scrollable layouts from the layouts tab. I've never worked with these but I'm told they're decent. – Scott P Apr 12 '13 at 11:01
  • I had a problem like this, and the solution was to put a `TLayout` inside the scroll box, and size that layout however it needs to be to fit all the images (calculate image positions / dimensions). The scrollbars and scroll ability will then appear. – Jerry Dodge Jun 28 '15 at 17:36

0 Answers0