Hello, this could be a very newbie question but I've already read the PyGTK tutorial and the PyGTK reference and I couldn't get the answer...

First at all, I'm developing an app using pygtk, the app will extract all the info from a database, it will show a list of items to the user, the user will choose the appropiates items and click in the Accept button, I will get only the checked items from the list... It sounds so easy, but when I implement the solution using PyGTK I have some troubles...

I use a ListStore to show the items, the first column is a gobject.TYPE_BOOLEAN and the first renderer is a gtk.CellRendererToggle...

consider the following example (very similar to my code):

  1. renderertoggle = gtk.CellRenderToggle()
  2. renderertext = gtk.CellRendererText()
  3. itemlist = [[False, 'Item name 1'], [False, 'Item name2']]
  4. model = gtk.ListStore(bool, str)
  5. column = gtk.TreeViewColumn('Check', renderertoggle)
  6. theTreeView.append_column(column)
  7. column = gtk.TreeViewColumn('String', renderertext, text=1)
  8. for item in itemlist :
  9.         model.append(item)

The model is shown but I couldn't check any of the items in the list... (the toggle button is not working!), how could I get my finish with it? (I guess I will need then to retrive the data from the list, how could I get it?)

I really appreciate your help!
_______________________________________________
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