GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing docs.wxpython.org — wx.WindowDisabler — wxPython 4.3.2 Docs
|
Disables all top level windows of the applications. |
|
Class API¶Possible constructors:
WindowDisabler(disable=True) -> None WindowDisabler(winToSkip, winToSkip2=None) -> None
This class disables all top level windows of the application (maybe with the exception of one of them) in its constructor and enables them back in its destructor.
__init__ (self, disable=True)
Disables all top level windows of the applications.
If disable is false nothing is done. This can be convenient if the windows should be disabled depending on some condition.
disable (bool)
None
Added in version 2.9.0.
__init__ (self, winToSkip, winToSkip2=None)
Disables all top level windows of the applications with the exception of winToSkip if it is not nullptr.
Notice that under MSW if winToSkip appears in the taskbar, the user will be able to close the entire application (even though its main window is disabled) by right clicking on the taskbar icon and selecting the appropriate “Close” command from the context menu. To prevent this from happening you may want to use wx.FRAME_TOOL_WINDOW, if applicable, or wx.FRAME_NO_TASKBAR style when creating the window that will remain enabled.
The argument winToSkip2 may be used to specify another window to leave enabled, if it is non-null. This parameter is only available since wxWidgets 3.1.7.