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