wx.ToolTip¶
This class holds information about a tooltip associated with a window (see wx.Window.SetToolTip
).
The four static methods, wx.ToolTip.Enable
, wx.ToolTip.SetDelay
wx.ToolTip.SetAutoPop
and wx.ToolTip.SetReshow
can be used to globally alter tooltips behaviour.
Class Hierarchy¶
Methods Summary¶
Constructor. |
|
Enable or disable tooltips globally. |
|
Get the tooltip text. |
|
Get the associated window. |
|
Set the delay after which the tooltip disappears or how long a tooltip remains visible. |
|
Set the delay after which the tooltip appears. |
|
Set tooltip maximal width in pixels. |
|
Set the delay between subsequent tooltips to appear. |
|
Set the tooltip text. |
Properties Summary¶
See |
Class API¶
- class wx.ToolTip(Object)¶
Possible constructors:
ToolTip(tip) -> None
This class holds information about a tooltip associated with a window (see Window.SetToolTip()).
Methods¶
- __init__(self, tip)¶
Constructor.
- Parameters:
tip (string)
- Return type:
None
- static Enable(flag)¶
Enable or disable tooltips globally.
- Parameters:
flag (bool)
- Return type:
None
Note
May not be supported on all platforms (eg. Cocoa).
- GetTip(self)¶
Get the tooltip text.
- Return type:
str
- static SetAutoPop(msecs)¶
Set the delay after which the tooltip disappears or how long a tooltip remains visible.
- Parameters:
msecs (long)
- Return type:
None
Note
May not be supported on all platforms (eg. Cocoa, GTK).
- static SetDelay(msecs)¶
Set the delay after which the tooltip appears.
- Parameters:
msecs (long)
- Return type:
None
Note
May not be supported on all platforms.
- static 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.
- Parameters:
width (int)
- Return type:
None
Note
Currently this function is MSW-only.
- static SetReshow(msecs)¶
Set the delay between subsequent tooltips to appear.
- Parameters:
msecs (long)
- Return type:
None
Note
May not be supported on all platforms (eg. Cocoa, GTK).
- SetTip(self, tip)¶
Set the tooltip text.
- Parameters:
tip (string)
- Return type:
None
Properties¶