diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-03-04 13:27:49 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-03-04 13:27:49 +0200 |
commit | 2faca405b16ddd0fddac5f7198472fd427fdfd54 (patch) | |
tree | 3b530eb363753ae0f98073f4255507ebbeeb5fe8 /uidesigner/vfdforms.pas | |
parent | 27e8a4849eb43784c7c9817349706a97330f6f59 (diff) | |
download | fpGUI-2faca405b16ddd0fddac5f7198472fd427fdfd54.tar.xz |
UI Designer: Replace ModalResult magic numbers with constants.
Diffstat (limited to 'uidesigner/vfdforms.pas')
-rw-r--r-- | uidesigner/vfdforms.pas | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/uidesigner/vfdforms.pas b/uidesigner/vfdforms.pas index a9181775..55cb9bf7 100644 --- a/uidesigner/vfdforms.pas +++ b/uidesigner/vfdforms.pas @@ -159,9 +159,9 @@ end; procedure TInsertCustomForm.OnButtonClick(Sender: TObject); begin if Sender = btnOK then - ModalResult := 1 + ModalResult := mrOK else - ModalResult := 2; + ModalResult := mrCancel; end; { TNewFormForm } @@ -191,9 +191,9 @@ end; procedure TNewFormForm.OnButtonClick(Sender: TObject); begin if Sender = btnOK then - ModalResult := 1 + ModalResult := mrOK else - ModalResult := 2; + ModalResult := mrCancel; end; { TEditPositionForm } @@ -224,9 +224,9 @@ end; procedure TEditPositionForm.OnButtonClick(Sender: TObject); begin if Sender = btnOK then - ModalResult := 1 + ModalResult := mrOK else - ModalResult := 2; + ModalResult := mrCancel; end; { TWidgetOrderForm } @@ -408,8 +408,8 @@ procedure TVFDDialog.HandleKeyPress(var keycode: word; var shiftstate: TShiftSta begin if keycode = keyEscape then begin - ModalResult := 2; consumed := True; + ModalResult := mrCancel; end; inherited HandleKeyPress(keycode, shiftstate, consumed); end; @@ -435,7 +435,7 @@ end; procedure TfrmVFDSetup.btnOKClick(Sender: TObject); begin SaveSettings; - ModalResult := 1; + ModalResult := mrOK; end; procedure TfrmVFDSetup.AfterCreate; |