Re: [pygtk] Sharing a CellRenderer among two or more columns
Stéphane Brunet wrote: Hi, I am working on TreeViews using a ListStore model but I couldn't find any answer on this yet: Say I have a ListStore with 4 columns containing strings. They are all be rendered by a CellRendererText object in a separate TreeViewColumn. I have tried to use a single instance of CellRendererText assigned to each TreeViewColumn and it worked great. However, when I want to make each column editable, how do I specify the callback function to the CellRendererText object so that it will know in which column to put the new text ? Am I compelled to use a separate instance of CellRendererText for each column ? That's probably the only way - you have to determine which column from the cellrenderertext to set the right value in the liststore. With a single cellrenderetext you can't tell which column has been edited. John ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Sharing a CellRenderer among two or more columns
Hi, I am working on TreeViews using a ListStore model but I couldn't find any answer on this yet: Say I have a ListStore with 4 columns containing strings. They are all be rendered by a CellRendererText object in a separate TreeViewColumn. I have tried to use a single instance of CellRendererText assigned to each TreeViewColumn and it worked great. However, when I want to make each column editable, how do I specify the callback function to the CellRendererText object so that it will know in which column to put the new text ? Am I compelled to use a separate instance of CellRendererText for each column ? Thank you, Stéphane ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/