GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.WindowDisabler
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.WindowDisabler — wxPython 4.3.2 Docs

phoenix_title wx.WindowDisabler¶

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.

This is useful when you want to indicate to the user that the application is currently busy and cannot respond to user input.

Note

When instantiated, this affects only windows shown on the screen and not already disabled.

See also

wx.BusyCursor


class_hierarchy Class Hierarchy¶

Inheritance diagram for class WindowDisabler:

Inheritance diagram of WindowDisabler


method_summary Methods Summary¶

__init__

Disables all top level windows of the applications.

__enter__

__exit__


api Class API¶

class wx.WindowDisabler(object)¶

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.


Methods¶

__init__(self, *args, **kw)¶

overload Overloaded Implementations:



__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.

Parameters:

disable (bool)

Return type:

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.

Parameters:
  • winToSkip (wx.Window)

  • winToSkip2 (wx.Window)

Return type:

None





__enter__(self)¶


__exit__(self, exc_type, exc_val, exc_tb)¶
© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.