Hello!
I am trying to set up a masked combobox using wx.lib.masked.combobox.BaseMaskedComboBox with autocompletion. However, I've found a couple of problems. On one hand, if I run the code as I provide it in the test.py file, I get an error caused by the 'Antigua and Bermuda' option on the Country combobox. This is the traceback:
Traceback (most recent call last):
File "test.py", line 56, in <module>
Query(None, -1)
File "test.py", line 27, in __init__
self.Country = wx.lib.masked.combobox.BaseMaskedComboBox(panel, -1,size=(200, -1), choices=countries)
File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/masked/combobox.py", line 97, in __init__
MaskedEditMixin.__init__( self, name, **kwargs )
File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/masked/maskededit.py", line 1857, in __init__
self.SetCtrlParameters(**kwargs)
File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/masked/maskededit.py", line 2012, in SetCtrlParameters
self._validateChoices()
File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/masked/maskededit.py", line 2661, in _validateChoices
raise ve
ValueError: "Antigua and Bermuda" could not be entered into field -1 of control "maskedComboBox"
Then, if I remove this choice, I can run the code. However, it doesn't autocomplete when I start typing the name in the country combobox. Can anyone help?
Cheers!
Dani
test.py (71 Bytes)
···
--
Daniel Valverde Saub�
c/Joan Maragall 37 4 2
17002 Girona
Spain
Tel�fon m�bil: +34651987662
e-mail: dani.valverde@gmail.com
http://www.acrocephalus.net
http://natupics.blogspot.com
Si no �s del tot necessari, no imprimeixis aquest missatge. Si ho fas utilitza paper 100% reciclat i blanquejat sense clor. D'aquesta manera ajudar�s a estalviar aigua, energia i recursos forestals. GR�CIES!
Do not print this message unless it is absolutely necessary. If you must print it, please use 100% recycled paper whitened without chlorine. By doing so, you will save water, energy and forest resources. THANK YOU!