[Lazarus] Setting ModalResult
richard.mace at gmail.com
Tue Mar 13 00:40:31 CET 2012
I have my main form, performing the following code:
if frmLogIn.ShowModal = mrOk then
ShowMessage('OK was clicked');
Now, if at design time on my frmLogIn I have a btnOK.ModalReult := mrOk,
when btnOK is clicked, the form closes and the above result is true.
However, if at design time, on my frmLogIn I have btnOK.ModalResult :=
mrNone, and then on the btnOK.OnclickEvent I set the ModalResult := True,
the frmLogIn does not close, but it does set the ModalResult to mrOK,
however, I have to click the btnOK button for a second time for the form to
close. The same code is Delphi 7 set's the ModalResult to OK AND closes the
Is this a bug, or am I missing something?
Thanks in advance
Lazarus 0.9.30 fpc 2.4 Windows XP
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus