On Tue, 2004-03-16 at 07:19, David G. Mackay wrote: > On Tue, 2004-03-16 at 01:31, David M. Cook wrote: > > 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 > > That's all very good, but if I want to view a parent with 20 columns, > and then a child with 10 distinct columns, then it's going to get pretty > unwieldy. Then, let's consider that the child might have children. The > issue isn't whether I can store, retrieve, and edit the information in > the treeview, it's whether I can display it in a comprehensible form. > > BTW, I've read the FAQ, I was just hoping that there was something else > that I hadn't seen. > > Dave
I've use the CTree (0.6.x) when the parent has no real data (at least none that I wanted in the view) and the columns are really all for the children but it doesn't sound like a tree view is really going to work for your application. > > > _______________________________________________ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Steve McClure Racemi email: [EMAIL PROTECTED] 75 5th St NE voice: 404-892-5850 Suite 214 fax: 404-892-7215 Atlanta, GA 30308 http://www.racemi.com
signature.asc
Description: This is a digitally signed message part
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
