wxPanel(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

🌸 wxPanel(3) β€” Erlang Module Definition 🌸

okay bestie, welcome to wxPanel, the erlang module definition, and honestly? she's a whole vibe πŸ’–


✨ NAME ✨

wxPanel β€” a panel is a window on which controls are placed. that's it, that's the girl πŸŽ€


πŸ’… DESCRIPTION πŸ’…

so basically, a panel is normally placed inside a frame. her main character feature over her parent class wxWindow is that she comes with code for handling child windows and TAB traversal β€” and it's implemented natively if possible (like in wxGTK), or by wxWidgets itself if not. no cap. πŸ¦‹

Note: Tab traversal is implemented through an otherwise undocumented intermediate wxControlContainer class from which any class can derive in addition to the normal wxWindow base class. Please see and to find out how this is achieved. 😭
Note: if not all characters are being intercepted by your OnKeyDown or OnChar handler, it may be because you are using the wxTAB_TRAVERSAL style, which grabs some keypresses for use by child controls. lowkey a jumpscare but ok πŸ™ˆ

Remark: By default, a panel has the same colouring as a dialog. πŸ‘‘

See: wxDialog

This class is derived, and can use functions, from:

  • wxWindow
  • wxEvtHandler

wxWidgets docs: wxPanel 🌈

πŸŽ€ Events

Event types emitted from this class:

  • navigation_key

⭐ DATA TYPES ⭐

wxPanel() :: wx:wx_object().

πŸ”₯ FUNCTIONS πŸ”₯

  • destroy(This :: wxPanel()) -> ok. β€” destroys the object. bye bestie, it's giving closure πŸ’€
  • initDialog(This) -> ok when This :: wxPanel(). β€” sends a wxInitDialogEvent, which in turn transfers data to the dialog via validators. she's the messenger fr fr ✨

See: wxInitDialogEvent

  • new() -> wxPanel(). β€” default constructor. the classic, the iconic, the no-args girlie πŸ‘‘
  • new(Parent, [Option]) -> wxPanel()
when
    Parent :: wxWindow:wxWindow(),
    Option ::
        {winid, integer()} |
        {pos, {X :: integer(), Y :: integer()}} |
        {size, {W :: integer(), H :: integer()}} |
        {style, integer()}.

constructor. you hand her a Parent and a list of options, and she's born πŸ’–

  • setFocusIgnoringChildren(This) -> ok when This :: wxPanel(). β€” in contrast to wxWindow:setFocus/1 (see above) this will set the focus to the panel even if there are child windows in the panel. the way she just ignores the children?? main character energy for real 🌟

This is only rarely needed. (her words, not mine β€” so don't go doing it for funsies) πŸŽ€


mwah, that's the whole page, you ate it up 🫢✨

shoutout to Ericsson AB for bringing us this from wx 2.6 β€” the wxPanel(3) manual page, dated and sourced and slayed πŸ’…πŸ’–

πŸ“¦ where this page comes from