Hi,
my TreeView generates values dynamically, including the limits for a  
numerical column:

def spin_func(cell, editable, path, model):
     a = editable.get_adjustment()
     t = model.get(path, schema.maximum)
     a.set_property('upper', t)

a = gtk.Adjustment(0, 0, 9999, 1)
r = gtk.CellRendererSpin()
r.set_property('adjustment', a)
r.set_property('editable', True)
r.connect('editing-started', spin_func, self.model)

c = gtk.TreeViewColumn('Episode', r)
c.set_cell_data_func(r, text_data_func, schema.current)

This works where my first attempt using a.set_upper instead of  
a.set_property raised AttributeError. Is the documentation wrong?

Unfortunately after the first few edits, usually right after setting  
an upper of 10000, the editable breaks until I restart my program. The  
spinner behaves as if someone was sitting on the keyboard: cursor  
flickering, numbers dancing.
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to