summaryrefslogtreecommitdiff
path: root/examples/gui/modalforms/modalforms.lpr
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2015-04-09 08:12:22 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2015-04-09 08:12:22 +0100
commitdb31f06d5e7adf28fad60e36fd9e5d2cf0519e84 (patch)
treebc7782a4a174ce57836947cec194281651b642e7 /examples/gui/modalforms/modalforms.lpr
parentc8acc2c1666015daeb3038c838e5018c0ecd8903 (diff)
parentf37cd9b2a08a41b8d877f64f9d5d5402105ee74a (diff)
downloadfpGUI-db31f06d5e7adf28fad60e36fd9e5d2cf0519e84.tar.xz
Merge branch 'release-1.4'
Diffstat (limited to 'examples/gui/modalforms/modalforms.lpr')
-rw-r--r--examples/gui/modalforms/modalforms.lpr5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/gui/modalforms/modalforms.lpr b/examples/gui/modalforms/modalforms.lpr
index 99f53ab3..bac0af81 100644
--- a/examples/gui/modalforms/modalforms.lpr
+++ b/examples/gui/modalforms/modalforms.lpr
@@ -99,7 +99,7 @@ procedure TForm1.btnOpenForm2Click(Sender: TObject);
var
frm: TForm2;
begin
- frm := TForm2.Create(nil);
+ frm := TForm2.Create(Self);
try
frm.ShowModal;
writeln('Form2: This should only appear after the form closes.');
@@ -113,6 +113,7 @@ end;
constructor TForm1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
+ Visible:=False;
WindowTitle := 'Form1';
Sizeable := False;
SetPosition(150, 150, 200, 200);
@@ -144,7 +145,7 @@ procedure TMainForm.btnOpenForm1Click(Sender: TObject);
var
frm: TForm1;
begin
- frm := TForm1.Create(nil);
+ frm := TForm1.Create(Self);
try
frm.ShowModal;
writeln('Form1: This should only appear after the form closes.');