Phoenix Logo

phoenix_title wx.HelpProvider

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.


class_hierarchy Class Hierarchy

Inheritance diagram for class HelpProvider:


sub_classes Known Subclasses

wx.SimpleHelpProvider


method_summary Methods Summary

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.

api Class API



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


Methods



AddHelp(self, *args, **kw)

overload Overloaded Implementations:



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





static 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) –


static 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:
  • 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 .
Return type:

bool

Returns:

True if help was shown, or False if no help was available for this window.

New in version 2.7.0.