Search documentation of wx

# View Source wxPickerBase (wx v2.4.2)

Functions for wxPickerBase class

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.

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.

Styles

This class supports the following styles:

See: `wxColourPickerCtrl`

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

wxWidgets docs: wxPickerBase

# Summary

## Types

wxPickerBase()

## Functions

getInternalMargin(This)

Returns the margin (in pixel) between the picker and the text control.

getPickerCtrlProportion(This)

Returns the proportion value of the picker.

getTextCtrl(This)

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.

getTextCtrlProportion(This)

Returns the proportion value of the text control.

hasTextCtrl(This)

Returns true if this window has a valid text control (i.e. if the `wxPB_USE_TEXTCTRL` style was given when creating this control).

isPickerCtrlGrowable(This)

Returns true if the picker control is growable.

isTextCtrlGrowable(This)

Returns true if the text control is growable.

setInternalMargin(This, Margin)

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

setPickerCtrlGrowable(This)
setPickerCtrlGrowable/2

Sets the picker control as growable when `grow` is true.

setPickerCtrlProportion(This, Prop)

Sets the proportion value of the picker.

setTextCtrlGrowable(This)
setTextCtrlGrowable/2

Sets the text control as growable when `grow` is true.

setTextCtrlProportion(This, Prop)

Sets the proportion value of the text control.

# Types

Link to this type

# wxPickerBase()

View Source

    -type wxPickerBase() :: wx:wx_object().

# Functions

Link to this function

# getInternalMargin(This)

View Source

    -spec getInternalMargin(This) -> integer() when 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.

Link to this function

# getPickerCtrlProportion(This)

View Source

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

Returns the proportion value of the picker.

Link to this function

# getTextCtrl(This)

View Source

    -spec 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). 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).

Link to this function

# getTextCtrlProportion(This)

View Source

    -spec 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.

Link to this function

# hasTextCtrl(This)

View Source

    -spec 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).

Link to this function

# isPickerCtrlGrowable(This)

View Source

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

Returns true if the picker control is growable.

Link to this function

# isTextCtrlGrowable(This)

View Source

    -spec 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.

Link to this function

# setInternalMargin(This, Margin)

View Source

    -spec setInternalMargin(This, Margin) -> ok when 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.

Link to this function

# setPickerCtrlGrowable(This)

View Source

    -spec setPickerCtrlGrowable(This) -> ok when This :: wxPickerBase().

Link to this function

# setPickerCtrlGrowable/2

View Source

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

Sets the picker control as growable when `grow` is true.

Link to this function

# setPickerCtrlProportion(This, Prop)

View Source

    -spec 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.

Link to this function

# setTextCtrlGrowable(This)

View Source

    -spec setTextCtrlGrowable(This) -> ok when This :: wxPickerBase().

Link to this function

# setTextCtrlGrowable/2

View Source

    -spec 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.

Link to this function

# setTextCtrlProportion(This, Prop)

View Source

    -spec 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.