[lazarus] ShowModal

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Aug 14 07:48:17 EDT 2003


On 15 Aug 2003 07:40:47 +0700
Thomas Edwin Santosa <t_edwin_s at telkom.net> wrote:

> Hi everyone,
> 
> I think I missed something. I write codes like this:
> 
> 	.
> 	.
> 	Form1.ShowModal;
> 	.
> 	.
> 
> Form1 is a form created by New Form menu.
> 
> When I get to that line, a "TCustomForm.ShowModal is impossible' (or
> something like that) msg box appear.
> 
> How do I get rid of this? I mean, if ShowModal is not yet implemented
> (cmiiw), how can I emulate this?

When you use "new form", Visible of the new form is set to true. When you
create the form in the program, the form is instantly shown and can
therefore not be shown modal.
Simply set Visible to false in the object inspector.

I will change the default to false like Delphi.


Mattias






More information about the Lazarus mailing list