How to scroll the contents of TFlowPanel?

The Delphi implementation of the TFlowPanel control lacks an important feature of the C # version, AutoScroll .

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

How can I simulate the behavior of a C # version of a control?

Thanks Alin

PS I know that I can use TScrollBox to get this behavior, but TFlowPanel (in the TFlowPanel version) can significantly increase flexibility.

+4
source share
2 answers

Create a TFlowPanel inside a TScrollBox with the following properties:

  • Alignment: alLeft
  • AutoSize: TRUE
  • AutoWrap: FALSE

This should lead to the behavior that you experience after I think.

+8
source

If you want to scroll vertically

 FlowPanel1.Align := alTop; FlowPanel1.AutoSize := True; FlowPanel1.AUtoWrap := False; 
+3
source

Source: https://habr.com/ru/post/1315775/


All Articles