Re: How to create a window that cannot be closed by clicking on the X button
James Stallings II <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <CAOaG_2Y=S6JtLrFif7epKxyYBH43uLnB9BCv4o50WYUEHRVxsA@mail.gmail.com> |
There are obviously philosophical discussions to be had around the wisdom of removing window controls, but I will leave those to others and answer your question most directly. This is accomplished with the proper value passed for the frame style parameter when you create the frame. The value to be passed is wx.STAY_ON_TOP. see https://wxpython.org/Phoenix/docs/html/wx.Frame.html Best of luck ;) On Fri, Jul 17, 2020 at 11:53 AM Tim Roberts <[email protected]> wrote: > Matthias Brennwald wrote: > > > I am trying to create a window/frame that cannot be closed by clicking on > the X button. The purpose of the window is to show log messages or warnings > coming from various parts of the program. > > It seems to me that this is a matter for user education. If they want to > hide the window, let them hide the window. Maybe I don't want to have the > log messages cluttering up my desktop. Have a menu item that shows the > dialog again, and if some critical warning comes up, show it automatically, > but there's no good reason to make in uncloseable.. > > Unhideable windows and unkillable applications will always come back to > bite you eventually. > > -- > Tim Roberts, [email protected] > Providenza & Boekelheide, Inc. > > -- > You received this message because you are subscribed to the Google Groups > "wxPython-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/wxpython-users/264a3be9-aa04-5a9c-e8e6-6c3d9331001b%40probo.com > <https://groups.google.com/d/msgid/wxpython-users/264a3be9-aa04-5a9c-e8e6-6c3d9331001b%40probo.com?utm_medium=email&utm_source=footer> > . > -- ॐ♲ ♥ ☸☮ ☯☰☶☯☮ ☸ ♥ ♲ॐ -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/CAOaG_2Y%3DS6JtLrFif7epKxyYBH43uLnB9BCv4o50WYUEHRVxsA%40mail.gmail.com.