Hi,
I am a bit confused about the ComboBox. I would like to replace the
items of it and in the wxPython in Action book it says on page 222 that:
"Since wx.ComboBox is a subclass of wx.Choice, all of the methods of
wx.Choice can be called on a combo box, as displayed in table 7.14."
Now table 7.14 says that it lists the methods of a list boxes and among
others there is the Set() command listed.
I tried it but I am getting an AttributeError exception:
[...]
File "e:\pj\view.py", line 268, in __init__
cb.Set(['hello', 'day',])
AttributeError: 'ComboBox' object has no attribute 'Set'
The confusion comes in when I look in the wxPython documentation at
wxPython.org. There it shows that the
- ComboBox is derived from ItemContainer and Control
- Choice as well as ListBox are derived from ControlWithItems and
Control
When I look for the Set() member function, that it is actually part of
ListBox and hence cannot be used in Choice.
Am I understanding the book wrong? It seems to me that it is not right
what is said there about the ComboBox?
Thanks for any clarification.
Cheers,
Guenter