Re: Re: How to create a window that cannot be closed by clicking on the X button
Matthias Brennwald <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <CAEzcwTHTzC4sT9Fz0MOiuJ=O=O8MYh8np38Wp=kz=rz1FqB70w@mail.gmail.com> |
Have you tried this on Linux/GTK3? It does not work for me. 'bht' via wxPython-users <[email protected]> schrieb am So., 19. Juli 2020, 18:57: > I do this in some code with this: > > self.plotFrame = wx.Frame(None,wx.ID_ANY,lbl,size=size, > style=wx.DEFAULT_FRAME_STYLE ^ wx.CLOSE_BOX) > > This seems to be platform independent and deactivates the "close" button > which may still appear as grayed-out depending on the platform. I don't use > this on toplevel Frame but I think it will still work. > > Brian > > On Friday, July 17, 2020 at 11:45:37 AM UTC-5, 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. >> >> At first, I tried to remove the X button, but I couldn't make it work (I >> tried this: >> https://stackoverflow.com/questions/25024129/wxpython-how-to-hide-the-x-and-expand-button-on-window >> ). For now, I just made an event handler that essentially discards the >> "clicked on the X button" event. While this achieves what I need, it is >> confusing to the user ("Why is there an X button, if it does nothing!?") >> >> Is there a better, cleaner, nicer way to prevent users from closing a >> window? >> > -- > 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/64c1efdd-3d06-4245-b6af-83c68263ca06o%40googlegroups.com > <https://groups.google.com/d/msgid/wxpython-users/64c1efdd-3d06-4245-b6af-83c68263ca06o%40googlegroups.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/CAEzcwTHTzC4sT9Fz0MOiuJ%3DO%3DO8MYh8np38Wp%3Dkz%3Drz1FqB70w%40mail.gmail.com.