1wxFocusEvent(3)            Erlang Module Definition            wxFocusEvent(3)
2
3
4

NAME

6       wxFocusEvent - Functions for wxFocusEvent class
7

DESCRIPTION

9       A  focus event is sent when a window's focus changes. The window losing
10       focus receives a "kill focus" event while the window gaining it gets  a
11       "set focus" one.
12
13       Notice  that the set focus event happens both when the user gives focus
14       to the window (whether using the mouse or keyboard) and when it is done
15       from the program itself using wxWindow:setFocus/1.
16
17       The  focus  event handlers should almost invariably call wxEvent:skip/2
18       on their event argument to allow the default handling  to  take  place.
19       Failure to do this may result in incorrect behaviour of the native con‐
20       trols. Also note that wxEVT_KILL_FOCUS handler  must  not  call  wxWin‐
21       dow:setFocus/1 as this, again, is not supported by all native controls.
22       If you need to do this, consider using  the  Delayed  Action  Mechanism
23       (not implemented in wx) described in wxIdleEvent documentation.
24
25       See: Overview events
26
27       This class is derived (and can use functions) from: wxEvent
28
29       wxWidgets docs: wxFocusEvent
30

EVENTS

32       Use wxEvtHandler:connect/3 with wxFocusEventType to subscribe to events
33       of this type.
34

DATA TYPES

36       wxFocusEvent() = wx:wx_object()
37
38       wxFocus() =
39           #wxFocus{type = wxFocusEvent:wxFocusEventType(),
40                    win = wxWindow:wxWindow()}
41
42       wxFocusEventType() = set_focus | kill_focus
43

EXPORTS

45       getWindow(This) -> wxWindow:wxWindow()
46
47              Types:
48
49                 This = wxFocusEvent()
50
51              Returns the window associated with this event, that is the  win‐
52              dow which had the focus before for the wxEVT_SET_FOCUS event and
53              the  window  which  is  going  to  receive  focus  for  the  wx‐
54              EVT_KILL_FOCUS one.
55
56              Warning: the window pointer may be NULL!
57
58
59
60wxWidgets team.                     wx 2.1                     wxFocusEvent(3)
Impressum