wxControl(3)

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

πŸ’… wxControl β€” bestie edition ✨

okay so like. this manual page? it's wxControl, and she's the base class for a control β€” or as the girlies say, a "widget". we're folding the manual name in right here, yes we are. πŸŽ€


🌸 NAME 🌸

wxControl β€” this is the base class for a control, aka a "widget". no cap. πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so, a control is generally a small window that processes user input and/or displays one or more item of data. it's giving little guy with a job. main character energy but smol. ✨

this class is derived from β€” and can use functions from β€” these icons: πŸ‘‘

  • wxWindow
  • wxEvtHandler

also, wxWidgets docs: wxControl (go look, iykyk 🫢)

⭐ Events

event types emitted from this class, periodt:

  • command_text_copy
  • command_text_cut
  • command_text_paste

🧚 DATA TYPES 🧚

wxControl() :: wx:wx_object().

that's it. that's the type. iconic. πŸ’œ


✨ FUNCTIONS ✨

🌈 getLabel

getLabel(This) -> unicode:charlist() when This :: wxControl().

returns the control's label, exactly as it was passed to setLabel/2. πŸ’–

heads up bestie 🫢 β€” the returned string may contain mnemonics (those "&" characters) if they were passed to the setLabel/2 function. if you don't want them, use GetLabelText() (not implemented in wx). she's not available, sorry. 😭

also also β€” the returned string is always the string which was passed to setLabel/2, but it may be different from the string passed to SetLabelText() (not implemented in wx), since that last one escapes mnemonic characters. sneaky but factual. πŸ’…

🌸 setLabel

setLabel(This, Label) -> ok
                  when This :: wxControl(), Label :: unicode:chardata().

sets the control's label. slay. ✨

every single "&" character in the label is special β€” it means the character right after it is a mnemonic for this control, and you can use it to activate the control from the keyboard (typically with the Alt key in combination with it). πŸŽ€

to insert a literal ampersand character, you need to double it, i.e. use "&&". not me having to escape my own ampersands 😭

if this behaviour is undesirable, use SetLabelText() (not implemented in wx) instead. bye mnemonic city. πŸ‘‹

anyway that's the whole page bestie, no skips, no summaries, we kept every crumb πŸ“ β€” this was brought to you by Ericsson AB, running wx 2.6, so you already know who to thank. mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from