title: Conflicting AutoSize and AutoWrap in TFlowPanel
body: <p>I am trying to use TFlowPanel component in the following manner:  </p>
  
  <ol>
  <li>Place on the main form <code>Form1</code> component <code>FlowPanel1: TFlowPanel</code>.  </li>
  <li>Set <code>Form1.Width = 400</code>, <code>FlowPanel1.Align = alTop</code>, <code>FlowPanel1.AutoSize = True</code>, <code>FlowPanel1.AutoWrap = True</code>.  </li>
  <li>Place on the <code>FlowPanel1</code> 5 SpeedButtons and set their <code>Width</code> to 64.  </li>
  <li>Compile and run.</li>
  <li>Reduce width of the form (something about <code>Form1.Width = 200</code>).</li>
  </ol>
  
  <p>For some reason, the speedbuttons do not automatically line up in two rows when user resizes the form. Although, they do line up in two rows when <code>AutoSize = False</code>, <code>AutoWrap = True</code>.<br>
  What is the reason for this behavior and how to solve it?  </p>
  
  <p><strong>Edit</strong>: I've found "quick and dirty" solution. The following code is the event handler to the <code>TFlowPanel.OnResize</code> event:  </p>
  
  <pre><code>procedure TForm1.FlowPanel1Resize(Sender: TObject);
  begin
    with FlowPanel1 do
    begin
      AutoSize := False;
      Realign;            // line up controls
      AutoSize := True;   // adjust TFlowPanel.Height
    end;
  end;
  </code></pre>
  
  <p>However, I still wonder if there is a standard way to solve the problem.</p>