diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-12 09:16:13 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-12 09:16:13 +0000 |
commit | 3ea86d973fc79b932b571b864b585f6d5a18197b (patch) | |
tree | 4b68ec5899a2571ec2e4c7be2a75ae8f0cd89705 /examples | |
parent | e9d6a6c29375c2e0bf943eae5b92c65c42a8eb36 (diff) | |
download | fpGUI-3ea86d973fc79b932b571b864b585f6d5a18197b.tar.xz |
* updated the modalforms demo to show unwinding and setfocus behaviour.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gui/modalforms/modalforms.lpr | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/examples/gui/modalforms/modalforms.lpr b/examples/gui/modalforms/modalforms.lpr index 2be19773..546c4f12 100644 --- a/examples/gui/modalforms/modalforms.lpr +++ b/examples/gui/modalforms/modalforms.lpr @@ -18,7 +18,8 @@ uses gui_button, gui_label, gui_popupcalendar, - gui_combobox; + gui_combobox, + gui_edit; type // forward declaration @@ -30,6 +31,7 @@ type cal: TfpgComboBox; btnClose: TfpgButton; btnOpenForm1: TfpgButton; + edtTest: TfpgEdit; procedure btnCloseClick(Sender: TObject); procedure btnOpenForm1Click(Sender: TObject); public @@ -43,6 +45,7 @@ type Label1: TfpgLabel; btnClose: TfpgButton; btnOpenForm2: TfpgButton; + edtTest: TfpgEdit; procedure btnCloseClick(Sender: TObject); procedure btnOpenForm2Click(Sender: TObject); public @@ -54,6 +57,7 @@ type private Label1: TfpgLabel; btnClose: TfpgButton; + edtTest: TfpgEdit; procedure btnCloseClick(Sender: TObject); public constructor Create(AOwner: TComponent); override; @@ -79,6 +83,9 @@ begin btnClose := CreateButton(self, 110, 170, 80, 'Quit', @btnCloseClick); btnClose.ImageName := 'stdimg.Quit'; btnClose.ShowImage := True; + + edtTest := CreateEdit(self, 10, 60, 100, 23); + end; { TForm1 } @@ -96,6 +103,7 @@ begin frm := TForm2.Create(nil); frm.ShowModal; writeln('Form2: This should only appear after the form closes.'); + edtTest.SetFocus; finally frm.Free; end; @@ -118,6 +126,9 @@ begin cal := TfpgComboBox.Create(self); cal.SetPosition(10, 10, 120, 23); + + edtTest := CreateEdit(self, 10, 60, 100, 23); + end; @@ -156,6 +167,8 @@ begin cal := TfpgComboBox.Create(self); cal.SetPosition(10, 10, 120, 23); + + edtTest := CreateEdit(self, 10, 60, 100, 23); end; |