A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://wxpython.org/Phoenix/docs/html/wx.HelpProvider.html below:

wx.HelpProvider — wxPython Phoenix 4.2.4a1 documentation

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¶

Inheritance diagram for class

HelpProvider

:

Known Subclasses¶

wx.SimpleHelpProvider

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.

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)¶

Overloaded Implementations:

AddHelp (self, window, text)

Associates the text with the given window.

Parameters:
Return type:

None

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)

Return type:

None

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.Window)

Return type:

str


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)

Return type:

None


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.

Added in version 2.7.0.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4