.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.masked.combobox
.. highlight:: python
.. _wx.lib.masked.combobox.BaseMaskedComboBox:
==========================================================================================================================================
|phoenix_title| **wx.lib.masked.combobox.BaseMaskedComboBox**
==========================================================================================================================================
Base class for generic masked edit comboboxes; allows auto-complete of values.
It is not meant to be instantiated directly, but rather serves as a base class
for any subsequent refinements.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
BaseMaskedComboBox:
|
|sub_classes| Known Subclasses
==============================
:class:`wx.lib.masked.combobox.ComboBox`, :class:`wx.lib.masked.combobox.PreMaskedComboBox`
|
|super_classes| Known Superclasses
==================================
:class:`wx.ComboBox`, :class:`wx.lib.masked.maskededit.MaskedEditMixin`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.__init__` Default class constructor.
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.Append` This base control function override is necessary so the control can keep
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.AppendItems` :meth:`~lib.masked.combobox.ComboBox.AppendItems` is handled in terms
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.Clear` This base control function override is necessary so the derived control
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.Cut` This function redefines the externally accessible :meth:`ComboBox.Cut`
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.GetMark` GetTextSelection() -> Tuple[int, int]
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.IsEmpty` IsEmpty() -> bool
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.OnWindowDestroy`
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.Paste` This function redefines the externally accessible :meth:`ComboBox.Paste`
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.Refresh` This function redefines the externally accessible :meth:`ComboBox.Refresh`
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.SetFont` Set the font, then recalculate control size, if appropriate.
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.SetSelection` Necessary override for bookkeeping on choice selection, to keep current
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.SetValue` This function redefines the externally accessible :meth:`ComboBox.SetValue`
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.Undo` This function defines the undo operation for the control.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: BaseMaskedComboBox( wx.ComboBox, MaskedEditMixin )
Base class for generic masked edit comboboxes; allows auto-complete of values.
It is not meant to be instantiated directly, but rather serves as a base class
for any subsequent refinements.
.. method:: __init__( self, parent, id=-1, value = '', pos = wx.DefaultPosition, size = wx.DefaultSize, choices = [], style = wx.CB_DROPDOWN, validator = wx.DefaultValidator, name = "maskedComboBox", setupEventHandling = True, \*\*kwargs)
Default class constructor.
:param wx.Window `parent`: the window parent. Must not be ``None``;
:param integer `id`: window identifier. A value of -1 indicates a default value;
:param string `value`: value to be shown;
:param `pos`: the control position. A value of (-1, -1) indicates a default position,
chosen by either the windowing system or wxPython, depending on platform;
:type `pos`: tuple or :class:`wx.Point`
:param `size`: the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform;
:param list `choices`: a list of valid choices;
:param integer `style`: the window style;
:param wx.Validator `validator`: this is mainly provided for data-transfer, as control does
its own validation;
:param string `name`: the window name;
:param boolean `setupEventHandling`: setup event handling by default.
.. method:: Append( self, choice, clientData=None )
This base control function override is necessary so the control can keep
track of any additions to the list of choices, because :class:`ComboBox`
doesn't have an accessor for the choice list. The code here is the same
as in the SetParameters() mixin function, but is done for the individual
value as appended, so the list can be built incrementally without speed
penalty.
.. method:: AppendItems( self, choices )
:meth:`~lib.masked.combobox.ComboBox.AppendItems` is handled in terms
of :meth:`lib.masked.combobox.ComboBox.Append`, to avoid code replication.
.. method:: Clear( self )
This base control function override is necessary so the derived control
can keep track of any additions to the list of choices, because
:class:`ComboBox` doesn't have an accessor for the choice list.
.. method:: Cut(self)
This function redefines the externally accessible :meth:`ComboBox.Cut`
to be a smart "erase" of the text in question, so as not to corrupt the
masked control.
.. note::
This must be done in the class derived from the base wx control.
.. method:: GetMark(self)
GetTextSelection() -> Tuple[int, int]
Gets the current selection span.
.. method:: IsEmpty(\*args, \*\*kw)
IsEmpty() -> bool
Returns true if the control is empty or false if it has some items.
.. method:: OnWindowDestroy(self, event)
.. method:: Paste(self)
This function redefines the externally accessible :meth:`ComboBox.Paste`
to be a smart "paste" of the text in question, so as not to corrupt the
masked control.
.. note::
This must be done in the class derived from the base wx control.
.. method:: Refresh(self)
This function redefines the externally accessible :meth:`ComboBox.Refresh`
to validate the contents of the masked control as it refreshes.
.. note::
This must be done in the class derived from the base wx control.
.. method:: SetFont(self, \*args, \*\*kwargs)
Set the font, then recalculate control size, if appropriate.
see :meth:`ComboBox.SetFont` for valid arguments
.. method:: SetSelection(self, index)
Necessary override for bookkeeping on choice selection, to keep current
value current.
:param integer `index`: index to choice item to be set
.. method:: SetValue(self, value)
This function redefines the externally accessible :meth:`ComboBox.SetValue`
to be a smart "paste" of the text in question, so as not to corrupt the
masked control.
.. note::
This must be done in the class derived from the base wx control.
.. method:: Undo(self)
This function defines the undo operation for the control.
(The default undo is 1-deep.)