wxPickerBase(3)
π 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 thiswxPickerBaseclass. she takes care of it. periodt.
See: wxColourPickerCtrl π
This class is derived, and can use functions, from:
wxControlwxWindowwxEvtHandler
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 whenhasTextCtrl/1returnstrue. 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 whenhasTextCtrl/1returnstrue.
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 whenhasTextCtrl/1returnstrue.
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 whenhasTextCtrl/1returnstrue.
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 whenhasTextCtrl/1returnstrue.
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 whenhasTextCtrl/1returnstrue.
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
- 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