Hi,

I've got a TreeView that displays different kinds of data - basically book citations and plain text - in a sort of outline format.  I'd like the plain text to be editable, and the book citations to be noneditable, but I can't seem to figure out how to cancel editing.  The first column of my TreeModel contains the text to be displayed, and the second column contains xml data, which isn't displayed, but is used for a variety of purposes, including identifying the type of data.  The callback correctly prints "called!" when I try to edit a citation, but doesn't cancel the edit.  I've also tried calling editing_canceled(), but that doesn't work either.  Here's what my callback, connected to "editing-started", looks like right now:

      def outline_edit_start_cb(self, cell, editable, path, model):
        my_iter = model.get_iter_from_string(path)
        if model.get_value(my_iter, 1).tag == "cite":
            print "called!"   
            cell.stop_editing(True)
            return True
        return False

  Any help would be appreciated.

_______________________________________________
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