title: Remove controls from a scrollbox
body: <p>I am dynamicaly (at run time) adding controls into a TScrollBox using myScrollBox.AddObject</p>
  
  <p>Now I need to remove all the controls I added to put new ones.</p>
  
  <p>I tryed myScrollBox.Controls.Clear but after I call that function, any control I add are not showing up.</p>
  
  <p>(Warning: I'm new to delphi and Firemonkey)</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>Here is how I add my objects (this is just a test function)</p>
  
  <pre><code>procedure TMainForm.TaskDetailsAdd;
  var
    btn1 : TButton;
    intI : Integer;
    count: Integer;
  
  begin
    scbTaskVariables.BeginUpdate;
  
    count    := 0;
    for intI := 0 to 100 do
      begin
        btn1            := TButton.Create(self);
        btn1.Text       := 'Salut ' + IntToStr(intI);
        btn1.Parent     := scbTaskVariables;
        btn1.OnClick    := Button1Click;
        btn1.Tag        := intI * 10;
        btn1.Position.Y := intI * 50;
        btn1.Position.X := intI * 15;
        scbTaskVariables.AddObject(btn1);
        count := scbTaskVariables.ControlsCount;
      end;
    scbTaskVariables.EndUpdate;
  end;
  </code></pre>
  
  <p>The funny thing is that if I place a break point on count := scbTaskVariables.ControlsCount
  I can see that ControlsCount goes from 0 to 1 for the first control and then it stays to 1 for the others.</p>
  
  <p><strong>Update 2</strong></p>
  
  <p>I submitted <a href="http://qc.embarcadero.com/wc/qcmain.aspx?d=125440" rel="nofollow">QC#125440</a>.</p>