From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!x6YkKUCkj2qHLwbKnVEeag.user.46.165.242.91.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Gtk.Message_Dialog Date: Wed, 8 Sep 2021 21:01:32 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com> <96a6354d-1d37-4f61-a984-aeca00b21bcen@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: gioia.aioe.org; logging-data="37220"; posting-host="x6YkKUCkj2qHLwbKnVEeag.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:62675 List-Id: On 2021-09-08 19:09, AdaMagica wrote: > Dmitry A. Kazakov schrieb am Mittwoch, 8. September 2021 um 17:02:52 UTC+2: >> You must call Destroy on the dialog to kill its window. > Thanks, Dmitry, that worked. >> P.P.S. Modal dialogs is the root of all evil... > Whar else would you recommend? Just common sense of ergonomic UI, because I am no expert in this. I do not like dialogs because they cover other UI elements and require switching user attention. If I need some input field I usually reserve a place on the screen with confirmation and cancel buttons. I try to implement checking-while-typing when possible and not too annoying. A confirmation/commit button is IMO preferable, however modern UIs tend to commit changes as soon as the UI element loses the focus. For settings I use tabbed views. They tend to grow out of any measure. Not a perfect solution, but IMO much better than dialogs and in any case better than tree views when you need to expand and collapse nodes looking for a setting parameter. Modal dialogs are OK for emergencies when continuation is absolutely impossible without user intervention. One of few advantages of GTK is that widgets and containers automatically expand and shrink. One should use this feature and avoid fixed sizes. The minimum widget size, e.g. of a label or edit field can be set. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de