wxRuby Documentation Home

# Wx::ActivateEvent

An activate event is sent when a window or application is being activated
or deactivated.

## Derived from

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 ActivateEvent argument.

evt_activate() { | event | … } | Process a EVT_ACTIVATE event.
evt_activate_app() { | event | … } | Process a EVT_ACTIVATE_APP event.
evt_hibernate() { | event | … } | Process a hibernate event, supplying the member function.This event applies to App only, and only on Windows SmartPhone and PocketPC. It is generated when thesystem is low on memory; the application should free up as much memory as possible, and restorefull working state when it receives a EVT_ACTIVATE or EVT_ACTIVATE_APP event.

## Remarks

A top-level window (a dialog or frame) receives an activate event when it is
being activated or deactivated. This is indicated visually by the title
bar changing colour, and a subwindow gaining the keyboard focus.

An application is activated or deactivated when one of its frames becomes activated,
or a frame becomes inactivated resulting in all application frames being inactive.

Please note that usually you should call event.Skip in
your handlers for these events as not doing so can result in strange effects.

## See also

Event handling overview, App#is_active

## Methods

- ActivateEvent.new
- ActivateEvent#get_active

### ActivateEvent.new

ActivateEvent.new(%(arg-type)TYPE% eventType = 0, Boolean active = true, Integer id = 0)

Constructor.

### ActivateEvent#get_active

Boolean get_active()

Returns true if the application or window is being activated, false otherwise.

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