wxRuby Documentation Home

# Wx::HelpEvent

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 ContextHelp, 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 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 Widgets 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.

## Derived from

CommandEvent

Event

Object

## Event table macros

To process an activate event, use these event handler macros to direct input to a member
function that takes a HelpEvent argument.

evt_help(id) { | event | … } | Process a EVT_HELP event.
EVT_HELP_RANGE(id1, id2, func) | Process a EVT_HELP event for a range of ids.

## See also

ContextHelp, Dialog, Event handling overview

## Methods

- HelpEvent.new
- HelpEvent#get_position
- HelpEvent#set_position

### HelpEvent.new

HelpEvent.new(%(arg-type)TYPE% eventType = 0, Integer id = 0, Point point)

Constructor.

### HelpEvent#get_position

Point get_position()

Returns the left-click position of the mouse, in screen coordinates. This allows
the application to position the help appropriately.

### HelpEvent#set_position

set_position(%(arg-type)Point% pt)

Sets the left-click position of the mouse, in screen coordinates.

[This page automatically generated from the Textile source at 2023-06-09 00:45:32 +0000]