[Gambas-user] "Me.Persistent = True" does not work?

Benoît Minisini g4mba5 at gmail.com
Tue Jan 11 12:06:34 CET 2022


Le 10/01/2022 à 22:45, Cristiano Guadagnino a écrit :
> Il giorno lun 10 gen 2022 alle ore 15:19 Bruce Steers 
> <bsteers4 at gmail.com <mailto:bsteers4 at gmail.com>> ha scritto:
> 
> 
>         In less words :-)
> 
>         Non persistent means "closing = destroying".
> 
>         Persistent means "closing = hiding".
> 
> 
>     Yes but that's kind of misleading.
>     to be clear to our friend here, if the app only has 1 window then
>     closing that window closes the app if it is persistent or not yes?.
> 
> 
> Exactly: this is misleading.
> This is exactly how I read the docs, so I thought that setting my main 
> window as persistent it would not close when clicking on "X", but it 
> would hide instead.
> If it is not so, I think the docs should be amended to clarify the concept.
> 
> Cris
> 

It's a different thing.

GUI applications automatically quit when there have no opened windows 
(persistent or not) or trayicons (or watched file descriptors) anymore.

Because then the user has no way to interact with the program anymore, 
so it seems a good idea to stop the program.

You set the 'Persistent' property when you don't want to recreate your 
window each time you use it, usually when it's a dialog, or a tool window.

Regards,

-- 
Benoît Minisini


More information about the User mailing list