Am I correct that a wx.ListBox is created with a list of choices, and that
new choices cannot be dynamically added by the applications user?
You can programmatically add new items with the Append method.
If I want to create a list based on user input, I need a wx.ListCtrl in
list mode, yes?
Not necessarily. The main difference between the two is that wx.ListBox is typically used for small, simple lists of simple items, with no support for item colors, fonts, icons, extra columns, etc. wx.ListCtrl offers all of these things, plus the alternate icon views, ability to have virtually unlimited number of items, etc.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
You can programmatically add new items with the Append method.
Thanks, Robin. I thought that's what I had read, but it is not working for
me here. I'm getting a "<module> has no attribute <variable_name>" error,
and I've been trying to understand why for the past couple of hours. I'll
change back from a ListCtrl to a ListBox and see if I can fix that scoping
error.
Not necessarily. The main difference between the two is that wx.ListBox
is typically used for small, simple lists of simple items, with no support
for item colors, fonts, icons, extra columns, etc. wx.ListCtrl offers all
of these things, plus the alternate icon views, ability to have virtually
unlimited number of items, etc.
Well then, the wx.ListBox is perfect for my needs. It's a list of
structure names and need neither decorations or additional columns.
Hope you're on high ground; the rain's supposed to get heavy again.
Rich
···
On Fri, 10 Nov 2006, Robin Dunn wrote:
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc.(TM) | Accelerator
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863