title: Dynamically created buttons with equal alignment
body: <p>I am a newbie to this Delphi. I have been given an assignment that to create buttons dynamically. But the problem is that all buttons have to be aligned in a manner that it should fit inside the whole screen. i.e, if 10 buttons created the whole screen should be filled. Or if 9 is given 9 should be present and filled in the screen. Is it possible to do that? I tried and searched everywhere. But was helpless.</p>
  
  <p>Please help me if its possible. A good example is also appreciated since I mentioned earlier I am really new to this. The code I did follows here.</p>
  
  <pre><code>procedure TfrmMovieList.PnlMovieClick(Sender: TObject);
  begin
    for i := 0 to 9 do
    begin
      B := TButton.Create(Self);
      B.Caption := Format('Button %d', [i]);
      B.Parent := Panel1;
      B.Height := 23;
      B.Width := 100;
      B.Left := 10;
      B.Top := 10 + i * 25;
    end;
  end;
  </code></pre>