[pygtk] Simplifying what's stored in a ListStore (was Re: Inconsistent format for "path" in TreeView callbacks)
Alessandro Dentella
sandro at e-den.it
Mon May 9 19:25:00 WST 2011
On Mon, May 09, 2011 at 09:21:52AM +0800, Jason Heeris wrote:
> On 7 May 2011 15:55, Neil Muller <drnlmuller+gtk a gmail.com> wrote:
> > You can do via TreeViewColumn.set_cell_data_func and calling
> > set_property on the cell renderers.
>
> This approach has cleaned up my code somewhat, but there's one snag
> I've hit. The object with the properties I'm showing in the table is a
> subclass of GObject, and it has a "use" property that is displayed in
> a CellRendererToggle in the table. It's easy enough to connect to the
> "activate" signal and change the "use" property in the object, but
> it's going to other way I'm having problems with, ie. updating what
> the table displays when the "use" property changes in the object.
>
> Is there a way to tell the CellRenderer to redraw, or recheck?
sure. Emitting a row-changed will trigger a redraw:
model.emit('row-changed', path, iter)
sandro
*:-)
--
Sandro Dentella *:-)
http://www.reteisi.org Soluzioni libere per le scuole
http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy
More information about the pygtk
mailing list