File: wx.lib.masked.combobox.BaseMaskedComboBox.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (217 lines) | stat: -rw-r--r-- 10,093 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
.. 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>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.ItemContainer.html" title="wx.ItemContainer" alt="" coords="459,315,592,344"/> <area shape="rect" id="node10" href="wx.ComboBox.html" title="wx.ComboBox" alt="" coords="328,392,439,421"/> <area shape="rect" id="node2" href="wx.ItemContainerImmutable.html" title="wx.ItemContainerImmutable" alt="" coords="424,237,627,267"/> <area shape="rect" id="node3" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="157,5,259,35"/> <area shape="rect" id="node4" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="209,83,320,112"/> <area shape="rect" id="node7" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="205,160,325,189"/> <area shape="rect" id="node5" href="wx.Object.html" title="wx.Object" alt="" coords="283,5,364,35"/> <area shape="rect" id="node6" href="wx.lib.masked.maskededit.MaskedEditMixin.html" title="wx.lib.masked.maskededit.MaskedEditMixin" alt="" coords="5,392,303,421"/> <area shape="rect" id="node12" href="wx.lib.masked.combobox.BaseMaskedComboBox.html" title="wx.lib.masked.combobox.BaseMaskedComboBox" alt="" coords="101,469,437,499"/> <area shape="rect" id="node9" href="wx.Window.html" title="wx.Window" alt="" coords="221,237,309,267"/> <area shape="rect" id="node8" href="wx.Control.html" title="wx.Control" alt="" coords="221,315,309,344"/> <area shape="rect" id="node11" href="wx.TextEntry.html" title="wx.TextEntry" alt="" coords="334,315,433,344"/> </map> 
   </p>

|


|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`                       
:meth:`~wx.lib.masked.combobox.BaseMaskedComboBox.IsEmpty`                       
: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)


   .. method:: IsEmpty(\*args, \*\*kw)


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