Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Relative Position einer Form zur Hauptform (https://www.delphipraxis.net/64192-relative-position-einer-form-zur-hauptform.html)

Loki77 28. Feb 2006 16:58


Relative Position einer Form zur Hauptform
 
`Nabend!
Hier mal wieder eine kurze Frage:
Kann man die relative Position einer Form zur erzeugenden Form festlegen,
d.h. ich möchte die 2te Form neben, nicht überlappend zur 1ten erzeugen.
Danke, Gruss Loki

Luckie 28. Feb 2006 17:04

Re: Relative Position einer Form zur Hauptform
 
Die Eigenschaften Left und Top von TForm sind die Position deiner Form.

marabu 28. Feb 2006 17:48

Re: Relative Position einer Form zur Hauptform
 
Zusätzlich braucht man noch die Breite:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  with Form2 do
  begin
    Left := self.Left + self.Width;
    Top := self.Top;
    ShowModal;
  end;
end;
Grüße vom marabu


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:07 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz