Re: [Java-gnome-developer] Tree-Widget with Pixmaps at the nodes?
Brought to you by:
afcowie
From: Mark H. <mh...@ca...> - 2002-12-03 15:36:07
|
On Tue, 2002-12-03 at 15:11, Clemens Eisserer wrote: > Hi there! > > Please excuse that I´m asking so much, but I really didnt find a solution. No problem. We'll help wherever possible & I'm sure other readers of this list are glad to hear such advice. > A want to create a Tree-Widget wich has a pixmap at its node. Look at src/example/gtk/tree/TreeExample. You can add multiple renderers to each column (as is done in the first column of the example). If the first one you add is a CellRendererPixbuf, then you should get your desired effect. You will have to (for now) store the names of the image to be displayed at each node in one of the data blocks of the treestore and map this to the renderer in the column using something like myTreeColumn.addAttributeMapping( myPixbufRenderer, CellRendererPixBuf.Attibute.PIXBUF, 1) > PUH this widget is complex and a little bit contraintuitive..... ... but also very powerful. We should, probably, create more simple wrapper classes, like SimpleList. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |