__init__(self,
parent,
sizer,
desc,
value_type=None,
n=1,
min_length=1,
choices=None,
data=None,
default=None,
evt_fn=None,
tooltip=None,
divider=None,
padding=0,
spacer=None,
read_only=True,
can_be_none=False)
(Constructor)
| source code
|
Build the combo box list widget for a list of list selections.
- Parameters:
parent (wx object instance) - The parent GUI element.
sizer (wx.Sizer instance) - The sizer to put the combo box widget into.
desc (str) - The text description.
value_type (str) - The type of Python object that the value should be. This can be
one of 'float', 'int', or 'str'.
n (int) - The number of initial entries.
min_length (int) - The minimum length for the Combo_list object.
choices (list of str) - The list of choices (all combo boxes will have the same list).
data (list) - The data returned by a call to GetValue(). This is only used if
the element_type is set to 'combo'. If supplied, it should be
the same length at the choices list. If not supplied, the
choices list will be used for the returned data.
default (str or None) - The default value of the ComboBox. This is only used if the
element_type is set to 'combo'.
evt_fn (func) - The event handling function.
tooltip (str) - The tooltip which appears on hovering over the text or input
field.
divider (None or int) - The optional position of the divider. If None, the parent class
variable _div_left will be used if present.
padding (int) - Spacing to the left and right of the widgets.
spacer (None or int) - The amount of spacing to add below the field in pixels. If None,
a stretchable spacer will be used.
read_only (bool) - A flag which if True means that text cannot be typed into the
combo box widget.
can_be_none (bool) - A flag which specifies if the element is allowed to have the None
value.
|