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

  • Home
  • SEARCH
  • 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 7167463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:34:57+00:00 2026-05-28T14:34:57+00:00

This seems like a very simple problem, but I cannot get a scrollbox to

  • 0

This seems like a very simple problem, but I cannot get a scrollbox to display scrollbars, and it is driving me crazy.

Here is the situation. I need to display a variable number of frames in a portion of a form. The area in which these frames are being displayed can be resized either through a TSplitter or by resizing the form.

I am dynamically generating the frames based on records in a database when the form is created. This frames are parented to a FlowPanel, which is responsible for frame placement. The FlowPanel is in a ScrollBox.

Due to the FlowPanel, when the user uses the TSplitter or resizes the form, the frames may re-align themselves. If any of the frames re-position out of the view of the form, I expect the ScrollBox to display scrollbars so that the user could scroll down to those inaccessible frames. This does not happen. Those frames that are in the area of the flowpanel outside the dimensions of the scrollbox are inaccessible.

I’ve built some tests with simple objects in a scrollbox, and the scrollbox correctly places scrollbars if any of its contained objects appear outside of the scrollbox’s dimensions.

It does not matter if the flowpanel is aligned to clClient (the scrollbox) or anchored to the sides of the scrollbox, or none of these.

I realize that I can use a TPanel instead, and perform the placement and re-positioning of the frames in code from the panel’s OnResize event handler, but this is what the FlowPanel is for.

What’s going on here? I’ve fiddled around with many different scrollbox properties, and still can’t get it to work. What’s the issue, and is there a solution?


Ok. I am selecting Ewe’s answer as correct, but the trick to making this work was in one of his comments, and I am still not completely satified with the results.

Here is the scoop. I did have my ScrollBox and FlowPanel configured the way that Ewe suggested, but played around with a number of other settings because that configuration did not work. I am pretty sure this was due to the complexity of the form’s user interface, which has many panels in panels, many splitters, and the form itself is parented into a TabSheet of a PageControl (I omitted this fact since testing the form as a stand alone form produced the same results).

What made it work, albeit in a clunky fashion, is Ewe’s suggestion to toggle the FlowPanel’s AutoWrap off and on again. I added the following code to the OnResize event handler of the ScrollBox:

procedure TCurrentJobsForm.ScrollBox1Resize(Sender: TObject);
begin
  Flowpanel1.Autowrap := False;
  FlowPanel1.AutoWrap := True;
end;

There is a noticeable flicker when resizing, but I can live with that, since it produces the desired result. Once a user resizes the form, it will always be re-created using those dimensions, so resizing is something the user will do infrequently.

  • 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-28T14:34:58+00:00Added an answer on May 28, 2026 at 2:34 pm

    The ScrollBox will only show scrollbars when the containg controls exceed the visible rectangle. As the only control inside your scrollbox is the flowpanel, it doesn’t help to client align the flowpanel inside the scrollbox. This will always make the flowpanel equal the size of the scrollbox and thus no scrolling is necessary.

    If you want f.i. vertical scrolling, make the flowpanel top aligned and auto sized. This should make the flowpanel height bigger when more frames are placed inside.

    Just in case: check that the Visible property of the vertical scrollbar is set to true.

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

Sidebar

Related Questions

This problem seems very simple, however I cannot get this to work. I have
This seems like a very simple and a very common problem. The simplest example
So this seems like it's a very simple problem to anyone at all conversant
This seems like it should be something very easy to do, but every time
I have an issue that seems like very flaky behavour, is this a problem
This seems like a simple question, but I can't find it with the Stack
This seems like such a trivial problem, but I can't seem to pin how
Seems like a very simple question here: I've got a program where someone is
I'm aware this is probably a very simple problem with a 1-line-of-code answer but
This may be a very simple problem, but I couldn't find an answer googleing

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.