Search code examples
delphidelphi-2010vcl

How can I scroll the content of a TFlowPanel?


Delphi implementation of the TFlowPanel control seems to lack an important feature of the C# version, the AutoScroll one.

The C# control with AutoWrap= False and AutoScroll=True behave like a horizontal scrollable list of controls.

How can i mimic the behavior of the C# version of the control ?

Thanks, Alin

P.S. I know i can use TScrollBox to get this behavior but TFlowPanel (in the not crippled version) allow for much more flexibility.


Solution

  • Create your TFlowPanel inside a TScrollBox, with the following properties:

    • Align : alLeft
    • AutoSize : TRUE
    • AutoWrap : FALSE

    That should get you the behaviour you are after I think.