[Lazarus] Form emulated Showmodal

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Form emulated Showmodal

Free Pascal - Lazarus mailing list
For CudaText i need my emulation of ShowModal.

It must return w/o waiting form to close (like show). But form must show
like modal (all others must disable, and on closing -last disabled form
must enable). Smth exists already? What is list of forms in LCL. How to
get last form.

--
Regards,
Alexey

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Form emulated Showmodal

Free Pascal - Lazarus mailing list
On 20.04.2017 17:46, Alexey via Lazarus wrote:
> For CudaText i need my emulation of ShowModal.
>
> It must return w/o waiting form to close (like show). But form must
> show like modal (all others must disable, and on closing -last
> disabled form must enable). Smth exists already?

Not possible, AFAIK. Maybe with some hacks like Screen.DisableForms and
.EnableForms. Do it with some kind of event (OnShow, OnIdle, ...). Or
execute your code in a thread.

> What is list of forms in LCL. How to get last form.

Use Screen.Forms - it is sorted by Z-Order.

Ondrej

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Form emulated Showmodal

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 2017-04-20 16:46, Alexey via Lazarus wrote:
> It must return w/o waiting form to close (like show). But form must show
> like modal (all others must disable, and on closing

What you describe makes no sense. You want to show a for non-Modal, but
want it to act like application modal. In that case, just use ShowModal().

Regards,
  Graeme

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus