.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>BaseMaskedComboBox</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.masked.combobox.BaseMaskedComboBox_inheritance.png" alt="Inheritance diagram of BaseMaskedComboBox" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.masked.combobox.BaseMaskedComboBox.html" title="Base class for generic masked edit comboboxes; allows auto-complete of values." alt="" coords="224,469,576,499"/> <area shape="rect" id="node2" href="wx.ComboBox.html" title="A combobox is like a combination of an edit control and a listbox." alt="" coords="221,392,339,421"/> <area shape="rect" id="node3" href="wx.lib.masked.maskededit.MaskedEditMixin.html" title="This class allows us to abstract the masked edit functionality that could" alt="" coords="363,392,679,421"/> <area shape="rect" id="node4" href="wx.Control.html" title="This is the base class for a control or 'widget'." alt="" coords="83,315,176,344"/> <area shape="rect" id="node5" href="wx.ItemContainer.html" title="This class is an abstract base class for some wxWidgets controls which contain several items such as wx.ListBox, wx.CheckListBox, wx.ComboBox  or wx.Choice." alt="" coords="210,315,350,344"/> <area shape="rect" id="node6" href="wx.TextEntry.html" title="Common base class for single line text entry fields." alt="" coords="375,315,484,344"/> <area shape="rect" id="node7" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="62,237,159,267"/> <area shape="rect" id="node8" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="45,160,176,189"/> <area shape="rect" id="node9" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="51,83,170,112"/> <area shape="rect" id="node10" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="5,5,93,35"/> <area shape="rect" id="node11" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="118,5,229,35"/> <area shape="rect" id="node12" href="wx.ItemContainerImmutable.html" title="wx.ItemContainer  defines an interface which is implemented by all controls which have string subitems each of which may be selected." alt="" coords="183,237,395,267"/> </map> 
   </p>
   </div>

|


|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() -> (from, to)
: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() -> (from, to)
      
      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.)