What causes the control to be placed more left-right-top-bottom than another that has the same alignment?

I create 2 buttons at runtime. Both have the same parent and same alignment:

var
   Btn : TButton;
begin
   Btn := TButton.Create(Self);
   Btn.Caption := 'ButtonA';
   Btn.Align := alLeft;
   Btn.Parent := Self;

   Btn := TButton.Create(Self);
   Btn.Caption := 'ButtonB';
   Btn.Align := alLeft;
   Btn.Parent := Self;
end;

Why is one of them displayed more on the left than the other?

I mean, what determines that ButtonB is displayed more than ButtonA? (Why not the other way around?)

+4
source share

Source: https://habr.com/ru/post/1655449/


All Articles