wxChildFocusEvent(3)
β¨ wxChildFocusEvent β¨
okay bestie, welcome to the wxChildFocusEvent era of the Erlang manual pages, a.k.a. wxChildFocusEvent(3) π this one's a sweet little module definition and it's honestly giving "quietly essential" energy, so let's get into it π
πΈ NAME πΈ
wxChildFocusEvent β a child focus event gets sent to a (parent-)window when one of its child windows gains focus, so the window can restore focus back to its corresponding child later, if it loses it now and regains it later. lowkey thoughtful of it tbh π«Ά
π¦ DESCRIPTION π¦
okay so important vibe check first: the child window here means the direct child of the window that's receiving the event. don't get it twisted π if you wanna know which window is actually getting the focus, you hit up wxWindow:findFocus/0.
See: Overview events π
Now, this class is derived β and can use functions β from:
wxCommandEventwxEvent
it's giving "built different, but the family is iconic" π
wxWidgets docs: wxChildFocusEvent
π Events π
to subscribe to events of this type, use wxEvtHandler:connect/3 with wxChildFocusEventType. that's the whole ritual, no cap β¨
π DATA TYPES π
wxChildFocus() :: #wxChildFocus{}.wxChildFocusEvent() :: wx:wx_object().wxChildFocusEventType() :: child_focus.
short, sweet, no crumbs π
π FUNCTIONS π
getWindow(This) -> wxWindow:wxWindow()whenThis :: wxChildFocusEvent().
this one returns the direct child that receives the focus, or a (grand-)parent of the control receiving the focus. so like, it's the family tree situation, not always the main character π
and if you want the actually focused control? that's wxWindow:findFocus/0. periodt π
ngl if you skipwxWindow:findFocus/0and assumegetWindow/1hands you the truly focused widget, that's a plot twist you did not want, bestie. read the above twice. i'm serious π«Ά
okay that's the whole page!! πβ¨ this iconic little doc comes to you courtesy of Ericsson AB, from wx 2.6 β no date on this footer so we're just gonna assume it's timeless, and honestly? main character energy. bye bestie, go read Overview events next πΈπ¦π
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms