The interface to the wxListCtrl is too C++ like and doesn't really
fit into what I'd like to do in python. In the ideal world, I'd
just like to append entries to the list and now have to play the
insertItem/setItem game. I'd like to be able to do
something like this:
f = [ "field1", "field2", "field3" ]
list.Append (f)
This is just a question of upping the level of abstraction in
the python interface. Here's a function which could provide the
append functionality:
def Append (self, entry):
if len (entry):
pos = self.GetItemCount ()
self.InsertStringItem (pos, "%s" %entry[0])
for i in range (1, len (entry)):
self.SetStringItem (pos, i, "%s" %entry[i])
What do you guys think? It would be an easy change to make and
quite useful from the programmers perspective.
-- Mike
···
--
Michael Gilfix
mgilfix@eecs.tufts.edu