[lazarus] Why won't modal result work for me?

Andrew Johnson aj_genius at hotmail.com
Mon Sep 30 17:50:18 EDT 2002


On 30 Sep 2002 16:37:38 -0500
"Tony Maro" <tonym at nlisc.com> wrote:

>      ModalResult := mrOk;
>      self.close;

>The result is always mrCancel.

1st You don't call close on a ShowModal form. You just set the result, and 
it automatically closes. 2nd, I forgot to check to make sure that the 
modalresult wan't set before changing it on hide. Get rid of the close, and 
it should work fine. I will fix the other problem soon, its just missing an 
if..then.

Andrew

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com






More information about the Lazarus mailing list