views:

88

answers:

1

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.

+2  A: 

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.

Deltics
yes, that`s the behavior i wanted ... would be nice if that could be achieved with only one container control but that will have to do for now :) thank you
Alin Sfetcu
It could - you could derive a new control from TScrollbar incorporating that part of a TFlowPanel behaviour that you needed without any of the optional, additional capabilities that you don't need. If you have need to re-use this a great deal, then the time invested in creating such a control could be well repaid, but if not then this sort of "mash-up" is perfect and what component based development excels at - creating things that are greater [in utility] than the sum of the parts.
Deltics