************* wx.PickerBase ************* Inheritance diagram for `wx.PickerBase`: | .. inheritance-diagram:: wx.PickerBase | 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 a an horizontal `wx.BoxSizer `_ would do, with the text control on the left of the picker button. The proportion (see `wx.Sizer `_ documentation for more info about proportion values) of the picker control defaults to 1 when there isn't a text control associated (see ``wx.PB_USE_TEXTCTRL`` style) and to 0 otherwise. .. seealso:: `wx.ColourPickerCtrl `_ Derived From ^^^^^^^^^^^^^ * `wx.Control `_ * `wx.Window `_ * `wx.EvtHandler `_ * `wx.Object `_ Known Subclasses ^^^^^^^^^^^^^^^^ `wx.ColourPickerCtrl `_, `wx.DirPickerCtrl `_, `wx.FilePickerCtrl `_, `wx.FontPickerCtrl `_ Window Styles ^^^^^^^^^^^^^ ================================================== ================================================== Window Style Description ================================================== ================================================== ``wx.PB_USE_TEXTCTRL`` Creates a text control to the left of the picker which is completely managed by this `wx.PickerBase` class. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `CreateBase <#CreateBase>`_ * `GetInternalMargin <#GetInternalMargin>`_ * `GetPickerCtrl <#GetPickerCtrl>`_ * `GetPickerCtrlProportion <#GetPickerCtrlProportion>`_ * `GetTextCtrl <#GetTextCtrl>`_ * `GetTextCtrlProportion <#GetTextCtrlProportion>`_ * `HasTextCtrl <#HasTextCtrl>`_ * `IsPickerCtrlGrowable <#IsPickerCtrlGrowable>`_ * `IsTextCtrlGrowable <#IsTextCtrlGrowable>`_ * `SetInternalMargin <#SetInternalMargin>`_ * `SetPickerCtrlGrowable <#SetPickerCtrlGrowable>`_ * `SetPickerCtrlProportion <#SetPickerCtrlProportion>`_ * `SetTextCtrlGrowable <#SetTextCtrlGrowable>`_ * `SetTextCtrlProportion <#SetTextCtrlProportion>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `InternalMargin <#InternalMargin>`_ * `PickerCtrl <#PickerCtrl>`_ * `PickerCtrlGrowable <#PickerCtrlGrowable>`_ * `PickerCtrlProportion <#PickerCtrlProportion>`_ * `TextCtrl <#TextCtrl>`_ * `TextCtrlGrowable <#TextCtrlGrowable>`_ * `TextCtrlProportion <#TextCtrlProportion>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() `No docstrings available for this method.` -------- .. method:: CreateBase(parent, id, text="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, validator=wx.DefaultValidator, name=wx.ButtonNameStr) Alternative constructor. **Parameters:** * `parent` (`wx.Window `_) * `id` (int) * `text` (string) * `pos` (`wx.Point `_) * `size` (`wx.Size `_) * `style` (long) * `validator` (`wx.Validator `_) * `name` (string) | **Returns:** `bool` -------- .. method:: GetInternalMargin() Returns the margin (in pixel) between the picker and the text control. This function can be used only when `HasTextCtrl <#HasTextCtrl>`_ returns ``True``. | **Returns:** `int` -------- .. method:: GetPickerCtrl() `No docstrings available for this method.` -------- .. method:: GetPickerCtrlProportion() Returns the proportion value of the picker. | **Returns:** `int` -------- .. method:: GetTextCtrl() Returns a pointer to the text control handled by this window or ``None`` if the ``wx.PB_USE_TEXTCTRL`` style was not specified when this control was created. | **Returns:** `wx.TextCtrl `_ .. note:: the contents of the text control could be containing an invalid representation of the entity which can be chosen through the picker (e.g. the user entered 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. `wx.ColourPickerCtrl.GetColour `_, `wx.FilePickerCtrl.GetPath `_, etc). -------- .. method:: GetTextCtrlProportion() Returns the proportion value of the text control. This function can be used only when `HasTextCtrl <#HasTextCtrl>`_ returns ``True``. | **Returns:** `int` -------- .. method:: HasTextCtrl() Returns ``True`` if this window has a valid text control (i.e. if the ``wx.PB_USE_TEXTCTRL`` style was given when creating this control). | **Returns:** `bool` -------- .. method:: IsPickerCtrlGrowable() Returns ``True`` if the picker control is growable. | **Returns:** `bool` -------- .. method:: IsTextCtrlGrowable() Returns ``True`` if the text control is growable. This function can be used only when `HasTextCtrl <#HasTextCtrl>`_ returns ``True``. | **Returns:** `bool` -------- .. method:: SetInternalMargin(margin) Sets the margin (in pixel) between the picker and the text control. This function can be used only when `HasTextCtrl <#HasTextCtrl>`_ returns ``True``. **Parameters:** * `margin` (int) -------- .. method:: SetPickerCtrlGrowable(grow=True) Sets the picker control as growable when `grow` is ``True``. **Parameters:** * `grow` (bool) -------- .. method:: SetPickerCtrlProportion(prop) Sets the proportion value of the picker. **Parameters:** * `prop` (int) -------- .. method:: SetTextCtrlGrowable(grow=True) Sets the text control as growable when `grow` is ``True``. This function can be used only when `HasTextCtrl <#HasTextCtrl>`_ returns ``True``. **Parameters:** * `grow` (bool) -------- .. method:: SetTextCtrlProportion(prop) Sets the proportion value of the text control. This function can be used only when `HasTextCtrl <#HasTextCtrl>`_ returns ``True``. **Parameters:** * `prop` (int) -------- Properties ^^^^^^^^^^ .. attribute:: InternalMargin See `GetInternalMargin <#GetInternalMargin>`_ and `SetInternalMargin <#SetInternalMargin>`_ .. attribute:: PickerCtrl See `GetPickerCtrl <#GetPickerCtrl>`_ .. attribute:: PickerCtrlGrowable See `IsPickerCtrlGrowable <#IsPickerCtrlGrowable>`_ and `SetPickerCtrlGrowable <#SetPickerCtrlGrowable>`_ .. attribute:: PickerCtrlProportion See `GetPickerCtrlProportion <#GetPickerCtrlProportion>`_ and `SetPickerCtrlProportion <#SetPickerCtrlProportion>`_ .. attribute:: TextCtrl See `GetTextCtrl <#GetTextCtrl>`_ .. attribute:: TextCtrlGrowable See `IsTextCtrlGrowable <#IsTextCtrlGrowable>`_ and `SetTextCtrlGrowable <#SetTextCtrlGrowable>`_ .. attribute:: TextCtrlProportion See `GetTextCtrlProportion <#GetTextCtrlProportion>`_ and `SetTextCtrlProportion <#SetTextCtrlProportion>`_