wxPickerBase(3erl)

πŸ’– wxPickerBase(3erl) πŸ’–

Okay bestie, this is from the Erlang Module Definition manual, and it's literally all about wxPickerBase β€” the base abstract class for pickers that have an auxiliary text control. Slay. Let's get into it 🫢


🌸 NAME 🌸

wxPickerBase β€” Functions for wxPickerBase class ✨


✨ DESCRIPTION ✨

Base abstract class for all pickers which support an auxiliary text control.

This class handles all positioning and sizing of the text control like an horizontal wxBoxSizer would do, with the text control on the left of the picker button. Iconic πŸ’…

The proportion (see wxSizer documentation for more info about proportion values) of the picker control defaults to 1 when there isn't a text control associated (see wxPB_USE_TEXTCTRL style) and to 0 otherwise.

Lowkey important: the proportion value is 1 for no-text-control (when wxPB_USE_TEXTCTRL is not given), and 0 otherwise. No cap. πŸ”₯

πŸŽ€ Styles

This class supports the following styles:

(okay so the manual literally leaves this blank bestie β€” no styles listed, just vibes 😭 but it says it supports styles so... those are the breaks)

See: wxColourPickerCtrl

This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler

wxWidgets docs: wxPickerBase


πŸ¦‹ DATA TYPES πŸ¦‹

  • wxPickerBase() = wx:wx_object()

πŸ‘‘ EXPORTS πŸ‘‘

  • setInternalMargin(This, Margin) -> ok β€” types: This = wxPickerBase(), Margin = integer(). Sets the margin (in pixel) between the picker and the text control. πŸŽ€ This function can be used only when hasTextCtrl/1 returns true.
  • getInternalMargin(This) -> integer() β€” types: This = wxPickerBase(). Returns the margin (in pixel) between the picker and the text control. πŸ’– This function can be used only when hasTextCtrl/1 returns true.
  • setTextCtrlProportion(This, Prop) -> ok β€” types: 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.
  • setPickerCtrlProportion(This, Prop) -> ok β€” types: This = wxPickerBase(), Prop = integer(). Sets the proportion value of the picker. Look at the detailed description of wxPickerBase for more info. 🌈
  • getTextCtrlProportion(This) -> integer() β€” types: This = wxPickerBase(). Returns the proportion value of the text control. 🫢 This function can be used only when hasTextCtrl/1 returns true.
  • getPickerCtrlProportion(This) -> integer() β€” types: This = wxPickerBase(). Returns the proportion value of the picker. πŸ’…
  • hasTextCtrl(This) -> boolean() β€” types: 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). πŸ‘‘
  • getTextCtrl(This) -> wxTextCtrl:wxTextCtrl() β€” types: 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). Thus you should never parse the content of the textctrl to get the user's input; rather use the derived-class getter (e.g. wxColourPickerCtrl:getColour/1, wxFilePickerCtrl:getPath/1, etc.). Fr fr, don't do it πŸ™ˆ
  • isTextCtrlGrowable(This) -> boolean() β€” types: This = wxPickerBase(). Returns true if the text control is growable. 🧚 This function can be used only when hasTextCtrl/1 returns true.
  • setPickerCtrlGrowable(This) -> ok β€” types: This = wxPickerBase().
  • setPickerCtrlGrowable(This, Options :: [Option]) -> ok β€” types: This = wxPickerBase(), Option = {grow, boolean()}. Sets the picker control as growable when grow is true. 🌸
  • setTextCtrlGrowable(This) -> ok β€” types: This = wxPickerBase().
  • setTextCtrlGrowable(This, Options :: [Option]) -> ok β€” types: 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.
  • isPickerCtrlGrowable(This) -> boolean() β€” types: This = wxPickerBase(). Returns true if the picker control is growable. πŸ”₯

Big love to the wxWidgets team πŸ’– β€” this is from wx 2.2.2.1, and the page is wxPickerBase(3erl). Byeeeee! βœ¨πŸ¦‹

πŸ“¦ where this page comes from