wx.HelpProvider is an abstract class used by a program implementing context-sensitive help to show the help text for the given window.
The current help provider must be explicitly set by the application using Set
.
See also
wx.ContextHelp, wx.ContextHelpButton, wx.SimpleHelpProvider, wx.HelpControllerHelpProvider, wx.Window.SetHelpText
, wx.Window.GetHelpTextAtPoint
Associates the text with the given window. |
|
Returns pointer to help provider instance. |
|
This version associates the given text with all windows with this id. |
|
Removes the association between the window pointer and the help text. |
|
Set the current, application-wide help provider. |
|
Shows help for the given window. |
|
This function may be overridden to show help for the window when it should depend on the position inside the window, By default this method forwards to |
wx.
HelpProvider
(object)¶HelpProvider is an abstract class used by a program implementing context-sensitive help to show the help text for the given window.
AddHelp
(self, *args, **kw)¶AddHelp (self, window, text)
Associates the text with the given window.
window (wx.WindowBase) –
text (string) –
Note
Although all help providers have these functions to allow making wx.Window.SetHelpText
work, not all of them implement the functions.
AddHelp (self, id, text)
Associates the text with the given ID
.
This help text will be shown for all windows with ID
id, unless they have more specific help text associated using the other AddHelp
prototype. May be used to set the same help string for all Cancel buttons in the application, for example.
id (wx.WindowID) –
text (string) –
Note
Although all help providers have these functions to allow making wx.Window.SetHelpText
work, not all of them implement the functions.
Get
()¶Returns pointer to help provider instance.
Unlike some other classes, the help provider is not created on demand. This must be explicitly done by the application using Set
.
GetHelp
(self, window)¶This version associates the given text with all windows with this id.
May be used to set the same help string for all Cancel buttons in the application, for example.
window (wx.Window) –
string
RemoveHelp
(self, window)¶Removes the association between the window pointer and the help text.
This is called by the wx.Window destructor. Without this, the table of help strings will fill up and when window pointers are reused, the wrong help string will be found.
window (wx.WindowBase) –
Set
(helpProvider)¶Set the current, application-wide help provider.
helpProvider (wx.HelpProvider) –
Pointer to previous help provider or None
if there wasn’t any.
ShowHelp
(self, window)¶Shows help for the given window.
Override this function if the help doesn’t depend on the exact position inside the window, otherwise you need to override ShowHelpAtPoint
. Returns True
if help was shown, or False
if no help was available for this window.
window (wx.WindowBase) –
bool
ShowHelpAtPoint
(self, window, point, origin)¶This function may be overridden to show help for the window when it should depend on the position inside the window, By default this method forwards to ShowHelp
, so it is enough to only implement the latter if the help doesn’t depend on the position.
window (wx.WindowBase) – Window to show help text for.
point (wx.Point) – Coordinates of the mouse at the moment of help event emission.
origin (HelpEvent.Origin) – Help event origin, see wx.HelpEvent.GetOrigin
.
bool
True
if help was shown, or False
if no help was available for this window.
New in version 2.7.0.