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
AddHelp |
Associates the text with the given window. |
Get |
Returns pointer to help provider instance. |
GetHelp |
This version associates the given text with all windows with this id. |
RemoveHelp |
Removes the association between the window pointer and the help text. |
Set |
Set the current, application-wide help provider. |
ShowHelp |
Shows help for the given window. |
ShowHelpAtPoint |
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. |
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.
Parameters: |
|
---|
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.
Parameters: |
|
---|
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
.
Return type: | wx.HelpProvider |
---|
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.
Parameters: | window (wx.WindowBase) – |
---|---|
Return type: | 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.
Parameters: | window (wx.WindowBase) – |
---|
Set
(helpProvider)¶Set the current, application-wide help provider.
Parameters: | helpProvider (wx.HelpProvider) – |
---|---|
Return type: | wx.HelpProvider |
Returns: | 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.
Parameters: | window (wx.WindowBase) – |
---|---|
Return type: | 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.
Parameters: |
|
---|---|
Return type: | bool |
Returns: |
|
New in version 2.7.0.