Michael's example is excellent.  As a note for those who haven't seen
it, the Pygtk gtk.ListStore.append() method in Pygtk2 has a convenient
extension.  You can replace the two statements required by the C-style
API:

iter = store.append()
store.set(iter,
          0, 'Tim',
          1, 'Nichol',
          2, 'Wright',
          3, 'green')

with one statement that creates the row and adds data to it in one
step and fits in more naturally with Python's sequences:

store.append(('Tim', 'Nichol', 'Wright', 'Green'))

Either method is fine.

This useful nugget was stolen from the Pygtk FAQ entry 13.25
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.025.htp
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to