wxPickerBase(3)

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

πŸ’– wxPickerBase β€” the Erlang module definition, bestie edition πŸ’–

okay so. welcome to the wx manual, cutie. this one's from the Erlang Module Definition family, and the module is literally called wxPickerBase. she's abstract, she's a base class, and she is so important. let's get into it ✨


🌸 NAME 🌸

wxPickerBase β€” the base abstract class for all the pickers that support an auxiliary text control. she's the foundation, the blueprint, the moment πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so what does this class actually do? She handles all the positioning and sizing of the text control, like an horizontal wxBoxSizer would do β€” text control chillin' on the left, picker button on the right. that's the whole layout vibe πŸŽ€

The proportion of the picker control (and yes, you should go read the wxSizer documentation if you want more info about proportion values, bestie, it's all there) defaults to 1 when there isn't a text control associated (aka when you didn't use the wxPB_USE_TEXTCTRL style) and defaults to 0 otherwise. no cap.

✨ Styles ✨

This class supports the following styles, and there is exactly one, so pay attention πŸ‘‘

  • wxPB_USE_TEXTCTRL β€” creates a text control to the left of the picker, and that text control is completely managed by this wxPickerBase class. she takes care of it. periodt.

See: wxColourPickerCtrl πŸ‘€

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

  • wxControl
  • wxWindow
  • wxEvtHandler

wxWidgets docs: wxPickerBase 🌈


πŸŽ€ DATA TYPES πŸŽ€

  • wxPickerBase() :: wx:wx_object().

literally that's it. she's a wx_object(). iconic.


πŸ’… FUNCTIONS πŸ’…

getInternalMargin(This) -> integer() when This :: wxPickerBase().

Returns the margin (in pixels, bestie) between the picker and the text control.

This function can be used only when hasTextCtrl/1 returns true. don't try it otherwise, she will not answer 😭

getPickerCtrlProportion(This) -> integer() when This :: wxPickerBase().

Returns the proportion value of the picker. that's the whole thing, she's simple like that 🫢

getTextCtrl(This) -> wxTextCtrl:wxTextCtrl() when This :: wxPickerBase().

Returns a pointer to the text control handled by this window, or NULL if the wxPB\_USE\_TEXTCTRL style was not specified when this control was created.

Remark: the contents of the text control could be an invalid representation of the entity which can be chosen through the picker (e.g. when the user enters an invalid colour syntax because of a typo). So please, bestie, never parse the content of the textctrl to get the user's input. instead use the derived-class getter β€” e.g. wxColourPickerCtrl:getColour/1, wxFilePickerCtrl:getPath/1, etc. i am begging πŸ™ˆ

getTextCtrlProportion(This) -> integer() when This :: wxPickerBase().

Returns the proportion value of the text control.

This function can be used only when hasTextCtrl/1 returns true.

hasTextCtrl(This) -> boolean() when This :: wxPickerBase().

Returns true if this window has a valid text control (i.e. if the wxPB\_USE\_TEXTCTRL style was given when creating this control). a simple yes-or-no queen πŸ’–

isPickerCtrlGrowable(This) -> boolean() when This :: wxPickerBase().

Returns true if the picker control is growable. can she grow? vibe check says yes or no 🌱

isTextCtrlGrowable(This) -> boolean() when This :: wxPickerBase().

Returns true if the text control is growable.

This function can be used only when hasTextCtrl/1 returns true.

setInternalMargin(This, Margin) -> ok when This :: wxPickerBase(), Margin :: integer().

Sets the margin (in pixels) between the picker and the text control.

This function can be used only when hasTextCtrl/1 returns true.

setPickerCtrlGrowable(This, [Option]) -> ok when This :: wxPickerBase(), Option :: {grow, boolean()}.

Sets the picker control as growable when grow is true. it's giving "let her expand" πŸ’

setPickerCtrlProportion(This, Prop) -> ok when This :: wxPickerBase(), Prop :: integer().

Sets the proportion value of the picker.

Look at the detailed description of wxPickerBase for more info β€” yeah, scroll back up, the proportions default thing is right there, i got you πŸ₯°

setTextCtrlGrowable(This, [Option]) -> ok when This :: wxPickerBase(), Option :: {grow, boolean()}.

Sets the text control as growable when grow is true.

This function can be used only when hasTextCtrl/1 returns true.

setTextCtrlProportion(This, Prop) -> ok when This :: wxPickerBase(), Prop :: integer().

Sets the proportion value of the text control.

Look at the detailed description of wxPickerBase for more info.

This function can be used only when hasTextCtrl/1 returns true.

and that's the whole page, bestie!! πŸŽ‰ every last function accounted for, no details left behind, we ate and left no crumbs πŸ‘‘

this lil masterclass was brought to you by Ericsson AB, wx version 2.6, and she's dated wxPickerBase(3). mwah πŸ’‹βœ¨ keep slaying out there, and remember: don't parse that text control. i'm watching. πŸ’œ

πŸ“¦ where this page comes from