Table Of Contents

Previous topic

WindowDestroyEvent

Next topic

WindowModalDialogEvent

This Page

phoenix_title WindowDisabler

This class disables all windows of the application (may be 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.

See also

BusyCursor


class_hierarchy Inheritance Diagram

Inheritance diagram for class WindowDisabler

Inheritance diagram of WindowDisabler


method_summary Methods Summary

__init__ Disables all top level windows of the applications.

api Class API



class WindowDisabler(object)

This class disables all windows of the application (may be with the exception of one of them) in its constructor and enables them back in its destructor.

Possible constructors:

WindowDisabler(disable=True)

WindowDisabler(winToSkip)

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) –

New in version 2.9.0.



__init__ (self, winToSkip)

Disables all top level windows of the applications with the exception of winToSkip if it is not None.

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 FRAME_TOOL_WINDOW, if applicable, or FRAME_NO_TASKBAR style when creating the window that will remain enabled.

Parameters:winToSkip (Window) –