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

Inheritance diagram for class
ToolTip:
|
|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 : str) -> None
This class holds information about a tooltip associated with a window
(see `Window.SetToolTip()).`
.. method:: __init__(self, tip : str)
Constructor.
:param `tip`:
:type `tip`: string
:rtype: `None`
.. staticmethod:: Enable(flag : bool)
Enable or disable tooltips globally.
:param `flag`:
:type `flag`: bool
:rtype: `None`
.. note::
May not be supported on all platforms (eg. Cocoa).
.. method:: GetTip(self)
Get the tooltip text.
:rtype: `str`
.. method:: GetWindow(self)
Get the associated window.
:rtype: :ref:`wx.Window`
.. staticmethod:: SetAutoPop(msecs : int)
Set the delay after which the tooltip disappears or how long a tooltip remains visible.
:param `msecs`:
:type `msecs`: long
:rtype: `None`
.. note::
May not be supported on all platforms (eg. Cocoa, GTK).
.. staticmethod:: SetDelay(msecs : int)
Set the delay after which the tooltip appears.
:param `msecs`:
:type `msecs`: long
:rtype: `None`
.. note::
May not be supported on all platforms.
.. staticmethod:: SetMaxWidth(width : int)
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
:rtype: `None`
.. note::
Currently this function is MSW-only.
.. staticmethod:: SetReshow(msecs : int)
Set the delay between subsequent tooltips to appear.
:param `msecs`:
:type `msecs`: long
:rtype: `None`
.. note::
May not be supported on all platforms (eg. Cocoa, GTK).
.. method:: SetTip(self, tip : str)
Set the tooltip text.
:param `tip`:
:type `tip`: string
:rtype: `None`
.. attribute:: Tip
See :meth:`~wx.ToolTip.GetTip` and :meth:`~wx.ToolTip.SetTip`
.. attribute:: Window
See :meth:`~wx.ToolTip.GetWindow`