.. 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.TipWindow:

==========================================================================================================================================
|phoenix_title|  **wx.TipWindow**
==========================================================================================================================================

Shows simple text in a popup tip window on creation. 
         

This is used by :ref:`wx.SimpleHelpProvider`  to show popup help. The window automatically destroys itself when the user clicks on it or it loses the focus. 

You may also use this class to emulate the tooltips when you need finer control over them than what the standard tooltips provide. 








         



.. seealso:: :ref:`wx.ToolTip`    







|

|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>TipWindow</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.TipWindow_inheritance.svg" alt="Inheritance diagram of TipWindow" 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.TipWindow.html" title="Shows simple text in a popup tip window on creation." alt="" coords="55,236,188,265"/> <area shape="rect" id="node2" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="66,159,177,188"/> <area shape="rect" id="node3" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="55,82,188,111"/> <area shape="rect" id="node4" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="5,5,104,34"/> <area shape="rect" id="node5" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="128,5,251,34"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.TipWindow.__init__`                                                   Default constructor.
:meth:`~wx.TipWindow.Create`                                                     Construct the actual window object.
:meth:`~wx.TipWindow.GetClassDefaultAttributes`                                  
:meth:`~wx.TipWindow.SetBoundingRect`                                            By default, the tip window disappears when the user clicks the mouse or presses a keyboard key or if it loses focus in any other way - for example because the user switched to another application window.
================================================================================ ================================================================================


|


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


.. class:: wx.TipWindow(Window)

   **Possible constructors**::

       TipWindow() -> None
       
       TipWindow(parent, text, maxLength=100) -> None
       
   
   Shows simple text in a popup tip window on creation.



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



      |overload| **Overloaded Implementations:**

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

      
      **__init__** `(self)`
      
      Default constructor. 
                       
      
      If this constructor is used, :meth:`Create`   must be called later to actually create the window. 
      
      Prefer using :meth:`New`   instead. 
      
      
                      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      .. versionadded:: 4.3/wxWidgets-3.3.2  
           
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, parent, text, maxLength=100)`
      
      Use :meth:`New`   instead instead of the new code. 
                       
      
      This constructor is preserved only for backward compatibility, don't use it in the new code. 
      
      
                      
      
      
      :param `parent`: 
      :type `parent`: wx.Window
      :param `text`: 
      :type `text`: string
      :param `maxLength`: 
      :type `maxLength`: int
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Create(self, parent, text, maxLength=100, windowPtr=nullptr, rectBounds=nullptr)

      Construct the actual window object. 
                 

      The tip is shown immediately. 




      :param `parent`: The parent window, must be non-null   
      :type `parent`: wx.Window
      :param `text`: The text to show, may contain the new line characters   
      :type `text`: string
      :param `maxLength`: The length of each line, in pixels. Set to a very large value to avoid wrapping lines   
      :type `maxLength`: int
      :param `windowPtr`: Simply passed to :meth:`SetTipWindowPtr`   below, please see its documentation for the description of this parameter   
      :type `windowPtr`: TipWindow
      :param `rectBounds`: If non-null, passed to :meth:`SetBoundingRect`   below, please see its documentation for the description of this parameter  
      :type `rectBounds`: wx.Rect














      :rtype: `bool`




                  



      .. versionadded:: 4.3/wxWidgets-3.3.2  
     








   .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)




      :param `variant`: 
      :type `variant`: wx.WindowVariant




      :rtype: :ref:`wx.VisualAttributes`








   .. method:: SetBoundingRect(self, rectBound)

      By default, the tip window disappears when the user clicks the mouse or presses a keyboard key or if it loses focus in any other way - for example because the user switched to another application window. 
                 

      Additionally, if a non-empty `rectBound`  is provided, the tip window will also automatically close if the mouse leaves this area. This is useful to dismiss the tip mouse when the mouse leaves the object it is associated with. 




      :param `rectBound`: The bounding rectangle for the mouse in the screen coordinates   
      :type `rectBound`: wx.Rect






      :rtype: `None`     




                  




