Deutsch English Français Italiano |
<v54bcl$38kko$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Rich <rich@example.invalid> Newsgroups: comp.lang.tcl Subject: Re: how to create a dialog that is hidden/shown rather than created/destroyed Date: Fri, 21 Jun 2024 16:56:53 -0000 (UTC) Organization: A noiseless patient Spider Lines: 24 Message-ID: <v54bcl$38kko$1@dont-email.me> References: <RJ-dnawmWOec0-j7nZ2dnZfqnPWdnZ2d@brightview.co.uk> Injection-Date: Fri, 21 Jun 2024 18:56:54 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c1822e671ded941375ba81f7b10eb360"; logging-data="3429016"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ufmC+lysE1Nl66NjZcKCJ" User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64)) Cancel-Lock: sha1:Y18NI30Ny6Skv/6VDPkMFFrulDQ= Bytes: 1886 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.