.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.ToolTip:

==========================================================================================================================================
|phoenix_title|  **wx.ToolTip**
==========================================================================================================================================

This class holds information about a tooltip associated with a window (see :meth:`wx.Window.SetToolTip` ).          

The four static methods, :meth:`wx.ToolTip.Enable` , :meth:`wx.ToolTip.SetDelay`   :meth:`wx.ToolTip.SetAutoPop`   and :meth:`wx.ToolTip.SetReshow`   can be used to globally alter tooltips behaviour. 









|

|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>ToolTip</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.ToolTip_inheritance.png" alt="Inheritance diagram of ToolTip" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.ToolTip.html" title="wx.ToolTip" alt="" coords="5,83,88,112"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="5,5,87,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.ToolTip.__init__`                                                     Constructor.
:meth:`~wx.ToolTip.Enable`                                                       Enable or disable tooltips globally.
:meth:`~wx.ToolTip.GetTip`                                                       Get the tooltip text.
:meth:`~wx.ToolTip.GetWindow`                                                    Get the associated window.
:meth:`~wx.ToolTip.SetAutoPop`                                                   Set the delay after which the tooltip disappears or how long a tooltip remains visible.
:meth:`~wx.ToolTip.SetDelay`                                                     Set the delay after which the tooltip appears.
:meth:`~wx.ToolTip.SetMaxWidth`                                                  Set tooltip maximal width in pixels.
:meth:`~wx.ToolTip.SetReshow`                                                    Set the delay between subsequent tooltips to appear.
:meth:`~wx.ToolTip.SetTip`                                                       Set the tooltip text.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.ToolTip.Tip`                                                          See :meth:`~wx.ToolTip.GetTip` and :meth:`~wx.ToolTip.SetTip`
:attr:`~wx.ToolTip.Window`                                                       See :meth:`~wx.ToolTip.GetWindow`
================================================================================ ================================================================================


|


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


.. class:: wx.ToolTip(Object)

   **Possible constructors**::

       ToolTip(tip)
       
   
   This class holds information about a tooltip associated with a window
   (see `Window.SetToolTip()).`



   .. method:: __init__(self, tip)

      Constructor.                  


      :param `tip`: 
      :type `tip`: string







   .. staticmethod:: Enable(flag)

      Enable or disable tooltips globally.                  

                


      :param `flag`: 
      :type `flag`: bool






      .. note:: 

         May not be supported on all platforms (eg. Cocoa).   








   .. method:: GetTip(self)

      Get the tooltip text.                  

      :rtype: `string`








   .. method:: GetWindow(self)

      Get the associated window.                  

      :rtype: :ref:`wx.Window`








   .. staticmethod:: SetAutoPop(msecs)

      Set the delay after which the tooltip disappears or how long a tooltip remains visible.                  

                


      :param `msecs`: 
      :type `msecs`: long






      .. note:: 

         May not be supported on all platforms (eg. Cocoa, GTK).   








   .. staticmethod:: SetDelay(msecs)

      Set the delay after which the tooltip appears.                  

                


      :param `msecs`: 
      :type `msecs`: long






      .. note:: 

         May not be supported on all platforms (eg. Cocoa).   








   .. staticmethod:: SetMaxWidth(width)

      Set tooltip maximal width in pixels.                  

      By default, tooltips are wrapped at a suitably chosen width. You can pass -1 as `width`  to disable wrapping them completely, 0 to restore the default behaviour or an arbitrary positive value to wrap them at the given width. 

      Notice that this function does not change the width of the tooltips created before calling it. 

                


      :param `width`: 
      :type `width`: int






      .. note:: 

         Currently this function is MSW-only.   








   .. staticmethod:: SetReshow(msecs)

      Set the delay between subsequent tooltips to appear.                  

                


      :param `msecs`: 
      :type `msecs`: long






      .. note:: 

         May not be supported on all platforms (eg. Cocoa, GTK).   








   .. method:: SetTip(self, tip)

      Set the tooltip text.                  


      :param `tip`: 
      :type `tip`: string







   .. attribute:: Tip

      See :meth:`~wx.ToolTip.GetTip` and :meth:`~wx.ToolTip.SetTip`


   .. attribute:: Window

      See :meth:`~wx.ToolTip.GetWindow`

