How to insert into listbox using wxPython

Andrew na
Sat Jan 10 10:17:43 EST 2004


Hi I had tried something similiar to that earlier.

I typed what you wrote

for x in self.results:
    self.listbox.Append(x[0])

and I got the same error as what I had tried earlier

Traceback (most recent call last):
  File "S:\GUI\MYSQL\mysqlgui.py", line 65, in OnB2Button
    self.listbox.Append(x[0])
  File "F:\Python22\Lib\site-packages\wxPython\controls.py", line 78, in
Append
    val = controlsc.wxControlWithItems_Append(self, *_args, **_kwargs)
TypeError: String or Unicode type required

Any help is alway's appreciated






More information about the Python-list mailing list