OnResize (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following code keeps the right edge on Button1 against the right edge of Form1 when Form1 is resized.

Code

procedure TForm1.FormResize(Sender: TObject);
begin
  Button1.Left := Form1.ClientWidth-Button1.Width;
end;

Uses