[pygtk] ListStore question

mc collilieux mccnews at free.fr
Thu Oct 26 03:56:33 WST 2006


euoar wrote:

>> I'm learning the use of liststores and treeviews. I have wrotten
>> this litle class as exercice:


>> # name is the name of the new column to add, values is a tuple with
>>  the values to add def add_result (self, name, values): self.iter =
>> self.liststore.append(values[0]) for value in values: 
>> self.liststore.insert_after(self.iter,  value)


rereading the tutorial, I note "...The row parameter specifies the data
that should be inserted in the row after it is created ... If row is
specified it must be a tuple or list containing as many items as the
number of columns in the ListStore...so

self.liststore.insert_after(self.iter, [value])

Hope it's the good answer...

PS : sorry for the answer directly to your mail. too quickly clic

-- 
Marie-Claude Collilieux
Bretagne


More information about the pygtk mailing list