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 Formulargröße in Prozent (https://www.delphipraxis.net/166544-formulargroesse-prozent.html)

nachtstreuner 17. Feb 2012 15:33

Formulargröße in Prozent
 
Hallo liebe Delphi-Gemeinde,

ich hätte da mal eine Frage zur Formulargestaltung.

Das Hauptformular füllt den ganzen Bildschirm (maximized).
Wenn nun ein zweites Formular aufgerufen wird, soll dieses zum Beispiel 50 % des Hauptformulars überdecken.

Wie kann ich dem zweiten Formular mitteilen, das es nur diese Größe einnehmen darf und zentriert zur Mainform plaziert werden soll.

Bin gespannt auf Eure Tips.

s.h.a.r.k 17. Feb 2012 15:39

AW: Formulargröße in Prozent
 
Also 50% Fläche ist sehr unpräzise imho. Welches Format willst du denn haben? Das gleiche Format wie die MainForm?

Sollte das Format beibehalten werden, dann musst du die Properties des Unterformulars halt wie folgt setzen:
Delphi-Quellcode:
Factor := 1 / Math.Sqrt(2);
ChildForm.Width := Round(MainForm.Width* Factor);
ChildForm.Height := Round(MainForm.Height * Factor);


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:54 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