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_2ZJFrZvO-S4WrukZhPR_zUZ6-ZWdHZAaOfDZSOL+yKcOg@mail.gmail.com> |
Andrea: You are likely correct about wx.STAY_ON_TOP, unless you are targeting a linux desktop (I think qt3 is the underlying technology in my case). Windows and macOS have their own solutions and/or limitations. Cheers On Fri, Jul 17, 2020 at 7:01 PM James Stallings II < [email protected]> wrote: > doing this would be misleading,and so a bad choice in any case. > > On Fri, Jul 17, 2020 at 3:02 PM Charles McKnight <[email protected]> > wrote: > >> So why not just catch the event to close the window and do nothing with >> it? 🤔 >> >> On Jul 17, 2020, at 10:12 AM, James Stallings II < >> [email protected]> wrote: >> >> There are usecases just beyond mainstream where you want the desktop >> locked down in no uncertain terms. >> >> In my particular case, I am developing with an embedded raspberry pi in >> the interest of implementing an automated vendor. Neither operator nor the >> customer who procure from the vendor should ever, under any circumstances >> have access to the operating system or desktop. >> >> I am certain beyond doubt that my usecase is anything but unique. >> >> >> On Fri, Jul 17, 2020 at 12:07 PM Matt Newville < >> [email protected]> wrote: >> >>> Hi, >>> >>> >>> >>> On Fri, Jul 17, 2020 at 11:45 AM Matthias Brennwald <[email protected]> >>> 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? >>>> >>> >>> I would suggest raising a dialog window that explains why you don't want >>> them to close the window and provide a "really close" option that does >>> really close the window. >>> >>> --Matt >>> >>> >>> -- >>> 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/CA%2B7ESbqioUALJDFe%2B19rvPLnZ4QpV7Eh3XKzypgkaneuN7h3ug%40mail.gmail.com >>> <https://groups.google.com/d/msgid/wxpython-users/CA%2B7ESbqioUALJDFe%2B19rvPLnZ4QpV7Eh3XKzypgkaneuN7h3ug%40mail.gmail.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_2Zp0-MMzC9NZkR6B8zV226QSrD2HqxeCK0RqVmktKt35w%40mail.gmail.com >> <https://groups.google.com/d/msgid/wxpython-users/CAOaG_2Zp0-MMzC9NZkR6B8zV226QSrD2HqxeCK0RqVmktKt35w%40mail.gmail.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/68478310-44DD-42D4-815E-C318D36EEA5F%40gmail.com >> <https://groups.google.com/d/msgid/wxpython-users/68478310-44DD-42D4-815E-C318D36EEA5F%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/CAOaG_2ZJFrZvO-S4WrukZhPR_zUZ6-ZWdHZAaOfDZSOL%2ByKcOg%40mail.gmail.com.