.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.WindowDisabler:

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







.. seealso:: :ref:`wx.BusyCursor`    







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>WindowDisabler</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.WindowDisabler_inheritance.png" alt="Inheritance diagram of WindowDisabler" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.WindowDisabler.html" title="wx.WindowDisabler" alt="" coords="5,5,156,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.WindowDisabler.__init__`                                              Disables all top level windows of the applications.
:meth:`~wx.WindowDisabler.__enter__`                                             
:meth:`~wx.WindowDisabler.__exit__`                                              
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.WindowDisabler(object)

   **Possible constructors**::

       WindowDisabler(disable=True)
       
       WindowDisabler(winToSkip)
       
   
   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.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__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. 
      
                      
      
      
      :param `disable`: 
      :type `disable`: bool
      
      
      
      
      
      
      .. versionadded:: 2.9.0 
           
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__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 ``wx.FRAME_TOOL_WINDOW``, if applicable, or ``wx.FRAME_NO_TASKBAR`` style when creating the window that will remain enabled.                  
      
      
      :param `winToSkip`: 
      :type `winToSkip`: wx.Window
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: __enter__(self)




   .. method:: __exit__(self, exc_type, exc_val, exc_tb)



