On Mon, Mar 15, 2004 at 10:26:37PM -0600, David G. Mackay wrote:

> Is there any way to implement a treeview (other than deriving a new
> class from scratch) with allows child nodes to be differently formatted
> from the parent nodes?  I would like to use a treeview to view
> information from a database with related tables.

TreeModels are row oriented, i.e. each node is a row of with a fixed number
of columns with fixed types.  However, in the TreeView you can control the
visibility, editibility, background color, font, and any other properties
supported by the renderer(s) for each column on a row by row and cell by
cell basis.  You can do this by specifying that the renderer properties
should be taken from particular columns of the model

(example of setting the editable property this way)

http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.010.htp

or you can specify callback functions to set the properties:

http://www.async.com.br/faq/pygtk/index.py?req=all#13.29

Dave Cook
_______________________________________________
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