diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-07 12:32:59 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-07 12:32:59 +0200 |
commit | 2b0bb6d1167e479404bd5d616f4d6155b1a92255 (patch) | |
tree | 364ebdb5572305754a0fb383b08e9240fb946abe /src/gui/messagedialog.inc | |
parent | 063cf4313bff63e6ec61596e681ac9674b1b7a49 (diff) | |
download | fpGUI-2b0bb6d1167e479404bd5d616f4d6155b1a92255.tar.xz |
ModalResult changed to a enum type
* Replaced all magic number modal results with actual enum values
* UI Designer now uses enum combolist for ModalResult type in
Object Inspector.
* UI Designer now handles default values of ModalResult property correctly.
Diffstat (limited to 'src/gui/messagedialog.inc')
-rw-r--r-- | src/gui/messagedialog.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/messagedialog.inc b/src/gui/messagedialog.inc index f07ec013..10ffd515 100644 --- a/src/gui/messagedialog.inc +++ b/src/gui/messagedialog.inc @@ -170,9 +170,9 @@ var { TODO : At some stage the StyleManager can give us the correct button order based on the OS and Window Manager. } Result := 3; - sl.Add(cMsgDlgBtnText[mbYes] + '=' + IntToStr(mrYes)); - sl.Add(cMsgDlgBtnText[mbNo] + '=' + IntToStr(mrNo)); - sl.Add(cMsgDlgBtnText[mbCancel] + '=' + IntToStr(mrCancel)); + sl.Add(cMsgDlgBtnText[mbYes] + '=' + IntToStr(Integer(mrYes))); + sl.Add(cMsgDlgBtnText[mbNo] + '=' + IntToStr(Integer(mrNo))); + sl.Add(cMsgDlgBtnText[mbCancel] + '=' + IntToStr(Integer(mrCancel))); case DefaultButton of mbYes: lDefault := 0; mbNo: lDefault := 1; @@ -207,7 +207,7 @@ begin b := TfpgButton.Create(self); b.Name := 'DlgButton' + IntToStr(i+1); b.Text := sl.Names[i]; - b.ModalResult := StrToInt(sl.ValueFromIndex[i]); + b.ModalResult := TfpgModalResult(StrToInt(sl.ValueFromIndex[i])); if (i = lDefault) or (lcount = 1) then b.Default := True; FButtonList.Add(b); |