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 <CAEf70bzzQcorxSSNaVHb+rvX0aue7-WjP5a-SEprkQL+LG6SRA@mail.gmail.com>
EnableCloseButton does not remove the close button, it simply gives it a
“disabled” appearance (at least on Windows). If you want to remove the
close button then one of the StackOverflow answers should be the solution,
unless your window manager on GTK prevents wxWidgets from doing it. If
that’s the case, then you don’t have that many alternatives.

Andrea.


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 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/CAEf70bzzQcorxSSNaVHb%2BrvX0aue7-WjP5a-SEprkQL%2BLG6SRA%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.