[Tutor] [pygtk] ListStore question

shawn bright nephish at gmail.com
Fri Oct 27 15:01:32 CEST 2006


this is cool, ill give it a shot
sk

On 10/27/06, euoar <euoar at yahoo.es> wrote:
>
> euoar escribió:
> > mc collilieux escribió:
> >> 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
> >>
> > That's exactly the solution. It has to be a tuple. Thank you very much
> > for your help!
> >
> >
> > ______________________________________________ LLama Gratis a
> > cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por
> > minuto. http://es.voice.yahoo.com
> > _______________________________________________
> > pygtk mailing list   pygtk at daa.com.au
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> >
> I think I have the solution (I'm answering myself to avoid people to
> waste time thinking in my question):
>
> args = [str, str, str]
> gtk.ListStore(*args)
>
>
> ______________________________________________
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061027/0eec1d1e/attachment.htm 


More information about the Tutor mailing list