wxRuby Documentation Home

# Wx::ContextMenuEvent

This class is used for context menu events, sent to give
the application a chance to show a context (popup) menu.

## Derived from

CommandEvent

Event

Object

## Event table macros

To process a menu event, use these event handler macros to direct input to member
functions that take a ContextMenuEvent argument.

evt_context_menu() { | event | … } | A right click (or other context menu command depending on platform) has been detected.

## See also

Command events,

Event handling overview

## Methods

- ContextMenuEvent.new
- ContextMenuEvent#get_position
- ContextMenuEvent#set_position

### ContextMenuEvent.new

ContextMenuEvent.new(%(arg-type)TYPE% id = 0, Integer id = 0, Point pos=DefaultPosition)

Constructor.

### ContextMenuEvent#get_position

Point get_position()

Returns the position at which the menu should be shown.

### ContextMenuEvent#set_position

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

Sets the position at which the menu should be shown.

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