[pygtk] Cancel editing on a gtk.CellRendererText

Seth Mahoney seth.r.mahoney at gmail.com
Wed Jul 23 04:36:11 WST 2008


I'm not sure this is what I'm looking for.  I only have one visible column,
with one gtk.CellRendererText managing the whole thing.  I need a way to
either get at the individual cells within the column and set the editable
property there, or to cancel editing after it has begun if the data in the
second (invisible) column meets certain criteria.  Thanks for the tip
though.

--Seth

On Wed, Jul 16, 2008 at 4:49 PM, Alessandro Dentella <sandro at e-den.it>
wrote:

> > 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.
>
>
>
> you can set the cell as non editable. I have code as:
>
>     if not self.fields[v]['edit']:
>         try:
>             cell.set_property('editable', False)
>         except:
>             cell.set_property('sensitive', False)
>
> i don't remeber why I try both editable & sensitive. I guess it depends on
> the type of cell renderer.
>
> sandro
> *:-)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20080722/837be4c5/attachment.htm 


More information about the pygtk mailing list