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 wxBoxSizer would do, with the text control on the left of the picker button and the proportion of the picker fixed to value 1.
Derived from
wxControl
wxWindow
wxEvtHandler
wxObject
Include files
<wx/pickerbase.h>
Window styles
wxPB_USE_TEXTCTRL | Creates a text control to the left of the picker which is completely managed by this wxPickerBase class. |
See also
Members
wxPickerBase::SetInternalMargin
wxPickerBase::GetInternalMargin
wxPickerBase::SetTextCtrlProportion
wxPickerBase::GetTextCtrlProportion
wxPickerBase::HasTextCtrl
wxPickerBase::GetTextCtrl
wxPickerBase::IsTextCtrlGrowable
wxPickerBase::SetTextCtrlGrowable
wxPickerBase::IsPickerCtrlGrowable
wxPickerBase::SetPickerCtrlGrowable
void SetInternalMargin(intmargin)
Sets the margin (in pixel) between the picker and the text control. This function can be used only when HasTextCtrl returns true.
int GetInternalMargin() const
Returns the margin (in pixel) between the picker and the text control. This function can be used only when HasTextCtrl returns true.
void SetTextCtrlProportion(intprop)
Sets the proportion between the text control and the picker. Look at the overview of wxPickerBase for more details about this. This function can be used only when HasTextCtrl returns true.
int GetTextCtrlProportion() const
Returns the proportion between the text control and the picker. This function can be used only when HasTextCtrl returns true.
bool HasTextCtrl() const
Returns true if this window has a valid text control (i.e. if the wxPB_USE_TEXTCTRL style was given when creating this control).
wxTextCtrl * GetTextCtrl()
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. Very important: 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. wxColourPickerCtrl::GetColour, wxFilePickerCtrl::GetPath, etc).
bool IsTextCtrlGrowable() const
Returns true if the text control is growable. This function can be used only when HasTextCtrl returns true.
void SetTextCtrlGrowable(bool grow = true)
Sets the text control as growable when grow is true. This function can be used only when HasTextCtrl returns true.
bool IsPickerCtrlGrowable() const
Returns true if the picker control is growable.
void SetPickerCtrlGrowable(bool grow = true)
Sets the picker control as growable when grow is true. This function has effects only when HasTextCtrl returns true.