[Lazarus] Setting ModalResult

Richard Mace richard.mace at gmail.com
Wed Mar 14 12:45:10 CET 2012


2012/3/14 Mattias Gaertner <nc-gaertnma at netcologne.de>

> **
>
>
>
> Salvatore Coppola <coppolastudio at gmail.com> hat am 14. März 2012 um 11:57
> geschrieben:
>
> > Set in the Object Inspector Borderstyle to bsDialog and the form
> > behavior should be what you need
>
>
>
>
>
>  BorderStyle has nothing to do with ModalResult.
>
>
>
> This is enough to close a modal dialog:
>
>
>
> procedure TForm1.Button1Click(Sender: TObject);
>
> begin
>
>   ModalResult:=mrOk;
>
> end;
>
> Note:
>
> When a button's Modalresult is set, it will do the above when clicked.
>
> Setting the Button1.ModalResult alone will not close the form.
>
>
Curiously, it looks, at the moment, as if upgrading from 0.9.30 to
0.9.30.4RC3 might actually have fixed the issue I was having.
I'll do some more tests, and let you know the results.

Richard


>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120314/6ed7369f/attachment-0003.html>


More information about the Lazarus mailing list