.TH wxFocusEvent 3erl "wx 2.2.2.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxFocusEvent \- Functions for wxFocusEvent class .SH DESCRIPTION .LP A focus event is sent when a window\&'s focus changes\&. The window losing focus receives a "kill focus" event while the window gaining it gets a "set focus" one\&. .LP Notice that the set focus event happens both when the user gives focus to the window (whether using the mouse or keyboard) and when it is done from the program itself using \fIwxWindow:setFocus/1\fR\&\&. .LP The focus event handlers should almost invariably call \fIwxEvent:skip/2\fR\& on their event argument to allow the default handling to take place\&. Failure to do this may result in incorrect behaviour of the native controls\&. Also note that wxEVT_KILL_FOCUS handler must not call \fIwxWindow:setFocus/1\fR\& as this, again, is not supported by all native controls\&. If you need to do this, consider using the \fIDelayed Action Mechanism\fR\& (not implemented in wx) described in \fIwxIdleEvent\fR\& documentation\&. .LP See: Overview events .LP This class is derived (and can use functions) from: \fIwxEvent\fR\& .LP wxWidgets docs: wxFocusEvent .SH "EVENTS" .LP Use \fIwxEvtHandler:connect/3\fR\& with \fIwxFocusEventType\fR\& to subscribe to events of this type\&. .SH DATA TYPES .nf \fBwxFocusEvent()\fR\& = wx:wx_object() .br .fi .nf \fBwxFocus()\fR\& = .br #wxFocus{type = wxFocusEvent:wxFocusEventType(), .br win = wxWindow:wxWindow()} .br .fi .nf \fBwxFocusEventType()\fR\& = set_focus | kill_focus .br .fi .SH EXPORTS .LP .nf .B getWindow(This) -> wxWindow:wxWindow() .br .fi .br .RS .LP Types: .RS 3 This = wxFocusEvent() .br .RE .RE .RS .LP Returns the window associated with this event, that is the window which had the focus before for the \fIwxEVT_SET_FOCUS\fR\& event and the window which is going to receive focus for the \fIwxEVT_KILL_FOCUS\fR\& one\&. .LP Warning: the window pointer may be NULL! .RE