procedure TForm1.FormResize(Sender: TObject);
var
ctrl : TControl;
begin
if FlowLayout1.controlsCount > 0 then
begin
ctrl := FlowLayout1.controls [FlowLayout1.controlsCount - 1];
FlowLayout1.height := ctrl.position.y + ctrl.height ; //+ ... // allow for margins and padding if needed.
end;
end;
Struktur Komponen yang digunakan
Jangan lupa set properties FlowLayout / Gridlayout pada Align : Top
contoh codenya disini : Download
0 komentar: