.. include:: headings.inc .. _ToolTip: ========================================================================================================================================== |phoenix_title| **ToolTip** ========================================================================================================================================== This class holds information about a tooltip associated with a window (see :meth:`Window.SetToolTip` ). The four static methods, :meth:`ToolTip.Enable` , :meth:`ToolTip.SetDelay` :meth:`ToolTip.SetAutoPop` and :meth:`ToolTip.SetReshow` can be used to globally alter tooltips behaviour. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **ToolTip** .. raw:: html

Inheritance diagram of ToolTip

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~ToolTip.__init__` Constructor. :meth:`~ToolTip.Enable` Enable or disable tooltips globally. :meth:`~ToolTip.GetTip` Get the tooltip text. :meth:`~ToolTip.GetWindow` Get the associated window. :meth:`~ToolTip.SetAutoPop` Set the delay after which the tooltip disappears or how long a tooltip remains visible. :meth:`~ToolTip.SetDelay` Set the delay after which the tooltip appears. :meth:`~ToolTip.SetMaxWidth` Set tooltip maximal width in pixels. :meth:`~ToolTip.SetReshow` Set the delay between subsequent tooltips to appear. :meth:`~ToolTip.SetTip` Set the tooltip text. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~ToolTip.Tip` See :meth:`~ToolTip.GetTip` and :meth:`~ToolTip.SetTip` :attr:`~ToolTip.Window` See :meth:`~ToolTip.GetWindow` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ToolTip(Object) This class holds information about a tooltip associated with a window (see `Window.SetToolTip()).` **Possible constructors**:: ToolTip(tip) .. 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:`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:`~ToolTip.GetTip` and :meth:`~ToolTip.SetTip` .. attribute:: Window See :meth:`~ToolTip.GetWindow`