Hello,
what do you expect to be the result from the following code :

procedure TForm1.FormCreate(Sender: TObject);
var f1, f2 : TButton;
   E : TEdit;
begin
  f1 := TButton.Create(Panel1);
  with f1 do
    begin
      Parent := Panel1;
      Align := alRight;
      Caption := '1';
    end;

  f2 := TButton.Create(Panel1);
  with f2 do
    begin
      Parent := Panel1;
      Align := alRight;
      Caption := '2';
    end;

  E := TEdit.Create(Panel1);
  with E do
    begin
       Parent := Panel1;
       Align := alClient;
    end;
end;


I assumed that button f1 will be aligned to the right, button f2 will
be aligned to the right, next to the f1, and the edit box will fill
the remaining space.

See the attached image. This happens with Lazarus and Delphi.
Bug or a feature ????

Attachment: buttons.png
Description: PNG image

Reply via email to