************ wx.HelpEvent ************ Inheritance diagram for `wx.HelpEvent`: | .. inheritance-diagram:: wx.HelpEvent | Description =========== A help event is sent when the user has requested context-sensitive help. This can either be caused by the application requesting context-sensitive help mode via `wx.ContextHelp <../Widgets/wx.ContextHelp.html>`_, or (on MS Windows) by the system generating a ``WM_HELP`` message when the user pressed ``F1`` or clicked on the query button in a dialog caption. A help event is sent to the window that the user clicked on, and is propagated up the window hierarchy until the event is processed or there are no more event handlers. The application should call `wx.Event.GetId `_ to check the identity of the clicked-on window, and then either show some suitable help or call `event.Skip() `_ if the identifier is unrecognised. Calling `Skip` is important because it allows wxWidgets to generate further events for ancestors of the clicked-on window. Otherwise it would be impossible to show help for container windows, since processing would stop after the first window found. .. seealso:: `wx.ContextHelp <../Widgets/wx.ContextHelp.html>`_ , `wx.Dialog <../Widgets/wx.Dialog.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.CommandEvent `_ * `wx.Event `_ * `wx.Object <../Widgets/wx.Object.html>`_ Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_HELP(id, func) Process a ``wx.wxEVT_HELP`` event. wx.EVT_HELP_RANGE(id1, id2, func) Process a ``wx.wxEVT_HELP`` event for a range of ids. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetLink <#GetLink>`_ * `GetOrigin <#GetOrigin>`_ * `GetPosition <#GetPosition>`_ * `GetTarget <#GetTarget>`_ * `SetLink <#SetLink>`_ * `SetOrigin <#SetOrigin>`_ * `SetPosition <#SetPosition>`_ * `SetTarget <#SetTarget>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Link <#Link>`_ * `Origin <#Origin>`_ * `Position <#Position>`_ * `Target <#Target>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(type=wx.wxEVT_NULL, winid=0, pt=wx.DefaultPosition, origin=Origin_Unknown) Constructor. **Parameters:** * `type` (eventtype) * `winid` (int) * `pt` (`wx.Point <../Widgets/wx.Point.html>`_) * `origin` (int) | **Returns:** `wx.HelpEvent `_ -------- .. method:: GetLink() Get an optional link to further help | **Returns:** `string` -------- .. method:: GetOrigin() Returns the origin of the help event which is one of the following values: ================================= ========================================= Origin Flag Description ================================= ========================================= ``Origin_Unknown`` Unrecognized event source. ``Origin_Keyboard`` Event generated by ``F1`` key press. ``Origin_HelpButton`` Event generated by `wx.ContextHelp <../Widgets/wx.ContextHelp.html>`_ or using the "?" title bur button under MS Windows. ================================= ========================================= | The application may handle events generated using the keyboard or mouse differently, e.g. by using `wx.GetMousePosition <../wxFunctions.html#GetMousePosition>`_ for the mouse events. | **Returns:** `int` .. seealso:: `SetOrigin <#SetOrigin>`_ -------- .. method:: GetPosition() Returns the left-click position of the mouse, in screen coordinates. This allows the application to position the help appropriately. | **Returns:** `wx.Point <../Widgets/wx.Point.html>`_ -------- .. method:: GetTarget() Get an optional target to display help in. E.g. a window specification | **Returns:** `string` -------- .. method:: SetLink(link) Set an optional link to further help **Parameters:** * `link` (string) -------- .. method:: SetOrigin(origin) Set the help event origin, only used internally by wxWidgets normally. **Parameters:** * `origin` (int) .. seealso:: `GetOrigin <#GetOrigin>`_ -------- .. method:: SetPosition(pt) Sets the left-click position of the mouse, in screen coordinates. **Parameters:** * `pt` (`wx.Point <../Widgets/wx.Point.html>`_) -------- .. method:: SetTarget(target) Set an optional target to display help in. E.g. a window specification **Parameters:** * `target` (string) -------- Properties ^^^^^^^^^^ .. attribute:: Link See `GetLink <#GetLink>`_ and `SetLink <#SetLink>`_ .. attribute:: Origin See `GetOrigin <#GetOrigin>`_ and `SetOrigin <#SetOrigin>`_ .. attribute:: Position See `GetPosition <#GetPosition>`_ and `SetPosition <#SetPosition>`_ .. attribute:: Target See `GetTarget <#GetTarget>`_ and `SetTarget <#SetTarget>`_