Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7700843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:50:28+00:00 2026-05-31T22:50:28+00:00

I was looking for a custom image grid and found a similar question that

  • 0

I was looking for a custom image grid and found a similar question that had a really sweet component in an answer.

I downloaded the code and after some fiddling, I managed to get it to compile in DXE2. It looks really cool, but I can’t get either scrollbar to show up. I also can’t figure out how to dynamically control the images displayed. Or how to update the grid based on keyboard events.

Also, to get it to compile I had to remove the GR32 references; the library I downloaded had too many incompatibilities with DXE2 for me to resolve.

Any help would be greatly appreciated. This really looks like a killer component.

Update from Bill:

Here is a screenshot of incorrect thumbnail painting. I can not get the thumbnails to look like the screenshot from the component in question.

Thumbnail Painting of ImageGrid

If the thumbnails were painted at the same XY as the rects painted in the first pass they would look much better. Any idea on what is going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:50:30+00:00Added an answer on May 31, 2026 at 10:50 pm

    … but I can’t get either scrollbar to show up.

    Well, there is no horizontal scrollbar. There is the property ColWidth that controls how much images are drawn in one row, depending on the control’s width. You might update ColWidth in an OnResize event handler due to anchor settings, for example.

    The vertical scroll bar appears automatically when not all images (incl. spacing) fit in the clientrect. The images are drawn on a TPaintBox and that paint box’ size is updated as soon as the image count changes:

    procedure TImageGrid.RearrangeImages;
    begin
      ...
        FPainter.Height := Max(ClientHeight,
          FRowCount * (FRowHeight + FImageSpacing) - FImageSpacing);
    

    The component inherites from TScrollingWinControl, so the scroll bar should modify accordingly. If not, then Bill has a workaround found as commented:

    VertScrollBar.Range := FRowCount * (FRowHeight + FImageSpacing) - FImageSpacing;
    

    I understand this obviously also works, but I really wonder why the scroll bar’s range should be modified manually. Here in D7 I have no problem with a hidden vertical scroll bar.

    … I also can’t figure out how to dynamically control the images displayed. …

    The most easy way to fill the component is by assigning the Folder property to a path with images. Only the images with the file formats in the FileFormats property will be loaded. To specify the images manually (e.g. to combine multiple folders), use the FileNames property. When the Folder property is set, then the FileNames property is updated accordingly, but those file names are not stored in the DFM. When you change the file names (e.g. you delete one from the folder), then the Folder property is cleared and the component uses the FileNames property instead.

    … Or how to update the grid based on keyboard events. …

    The only keystrokes currently implemented are Up, Down, PageUp, PageDown, Home and End which all scroll the control. What more key actions do you wish? It’s a viewer.

    Here is a screenshot of incorrect thumbnail painting. I can not get the thumbnails to look like the screenshot from the component in question. … If the thumbnails were painted at the same XY as the rects painted in the first pass they would look much better.

    While loading the images, a temporary rect is drawn with size ColWidth * RowHeight. All images are stretchdrawn within that size, so adjust your ratio of these properties to make the spacing equal everywhere. Note that you can also influence appearance with the ImageHorzAlign and ImageVertAlign properties.

    Update:

    The component you refer to is recently completely rewritten, and some of the answers above are outdated.

    It now has a Propertional property that defaults to True, but when set False, it will stretch up the thumbs to whatever cell size you have set, independent from the original image sizes. Small images could remain narow though, unless you set the new Stretch property to True.

    It now distinguishes between RowHeight and CellHeight, and ColWidth and CellWidth. The difference between both is CellSpacing.

    The component does not descend from TScrollingWinControl anymore, but from TCustomControl and only the vertical scroll bar is added.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Java is there anyway to display a custom form/image that behaves similar to
I'm looking for a custom disk image creation app that I can integrate into
I am looking for a jQuery image gallery plug-in that supports custom thumbnails (filmstrip).
I looking to create a custom calender with Zend Framework, I am hoping that
My company is looking into writing a custom application that will need to perform
I wanted to create a button that had an image and a textblock as
I was looking to implement something like the image below, and really have no
I'm trying to create a custom component looking like a rectangle radio dial: As
We had a whole collection of Plone 3 sites with a custom Image type
I am creating an actionbar with custom looking buttons that I put in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.