[Gambas-user] A little question about propagation of events and ShowModal.

Benoît Minisini gambas at ...1...
Tue Oct 28 00:56:55 CET 2014


Le 27/10/2014 04:56, Jorge Carrión a écrit :
> I have a User help routine based in Key F1 keyrelease.
> The code is in form FMain Form_KeyRelease() Event.
> This event is nicely propagated to all forms in FMain.Controls collection
> and all works fine.
> Today I've noticed that doesn't work on modal forms (opened with ShowModal).
>
> If copy/paste the FMain code to Form_KeyRelease of modal form all works
> again but I thought that ShowModal it's only related with  the way that
> "Visual Focus" (if such thing exists) is managed.
>
> In ShowModal a form is non-dependant of FMain? I mean, by example: can
> FMain be closed since a showmodal form?
> If a showmodal form open a new form an closed himself after,  the form
> created is closed too?
>
> This are things that I could try in a moment, but I don't know if that
> gives me the solution to the question:
>
> What means, really, Showmodal?
>
> (Perhaps 5 A.M. o'clock its not the best time to make this questions...)
>
> Regards

"Modal" means that the window takes all the mouse and keyboard events of 
the application (it has its own event loop).

A window cannot be closed if there is a "child" modal window open. The 
modal window must be closed first.

As for your history about Form_KeyRelease, I don't understand what you 
are talking about. Please be more descriptive.

Regards,

-- 
Benoît Minisini




More information about the User mailing list