Re: How to create a window that cannot be closed by clicking on the X button
Andrea Gavana <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <CAEf70byia=xW5H8K_o_d14sGhjEm30yTyCMSCH55cf6aa9pZ2Q@mail.gmail.com> |
On Sat, 18 Jul 2020 at 10.05, Matthias Brennwald <[email protected]> wrote: > > > On Sa, Jul 18, 2020 at 04:53, Steve Barnes <[email protected]> wrote: > > Of course you could always change your event handler to have it display a > message explaining why the user is not allowed to close this window. > > > Sure. However, I think it's awkward to offer the user the possibility to > clock the close button, and then tell him/her that it's not allowed to > close the window. > > I WANT the user to see the log messages, so I DO NOT WANT them to close > the log display. > > I tried EnableCloseButton(False), but that did not remove the close > button. I am on Linux/GTK3. Is this a bug or a feature? > > The philosophical part seems to be the key to solve my problem in a good > way. I guess there are good reasons why the GUI toolkit(s?) do not make it > straight forward to show a separate window without a close button. It might > be better to show the log messages in the main window of the program. > Closing this window is possible and is equivalent with exiting the program, > which seems more "natural" for the average user. > You might also try wx.MiniFrame and remove the style bits that involve the close button - as it is done in the StackOverflow answers - although I am not sure if wx.MiniFrame gives you any more flexibility on GTK or not. Andrea. -- > 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/7SNNDQ.NF4E2TWIL9YU%40gmail.com > <https://groups.google.com/d/msgid/wxpython-users/7SNNDQ.NF4E2TWIL9YU%40gmail.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/CAEf70byia%3DxW5H8K_o_d14sGhjEm30yTyCMSCH55cf6aa9pZ2Q%40mail.gmail.com.