Re: how to create a dialog that is hidden/shown rather than created/destroyed

Liste des GroupesRevenir à cl tcl 
Sujet : Re: how to create a dialog that is hidden/shown rather than created/destroyed
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tcl
Date : 21. Jun 2024, 17:56:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v54bcl$38kko$1@dont-email.me>
References : 1
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Mark Summerfield <mark@qtrac.eu> wrote:
Below is a tiny program.
 
The "About" form is created and destroyed. So you can click About then
close the About form, then repeat as often as you like.
 
The "Options" form is supposed to be shown and hidden. But once you click
it and then close it, the entire app is blocked. So clearly I'm doing
something wrong.

Based on your code you are showing the options as a "modal" dialog. 
Modal means it blocks the rest of the app.  Withdrawing the window does
not change its "modalness".  You need to not only withdraw the window
but also turn off the "modalness" of the window at the same time.

I.e., you need to "grab release" on the window as part of withdrawing
it.


As a suggestion, you might also consider making the options window
'non-modal' in that it can be open and the rest of the app can still
function.  Modality is more often evil than anything else in a GUI.



Date Sujet#  Auteur
21 Jun 24 * how to create a dialog that is hidden/shown rather than created/destroyed7Mark Summerfield
21 Jun 24 +* Re: how to create a dialog that is hidden/shown rather than created/destroyed2Mark Summerfield
21 Jun 24 i`- Re: how to create a dialog that is hidden/shown rather than created/destroyed1Mark Summerfield
21 Jun 24 +* Re: how to create a dialog that is hidden/shown rather than created/destroyed2Mark Summerfield
21 Jun 24 i`- Re: how to create a dialog that is hidden/shown rather than created/destroyed1Rich
21 Jun 24 `* Re: how to create a dialog that is hidden/shown rather than created/destroyed2Rich
22 Jun 24  `- Re: how to create a dialog that is hidden/shown rather than created/destroyed1Mark Summerfield

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal